diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 99a8a1a6fd6a0c..9e778041994626 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -150,6 +150,7 @@ CFLAGS cgit cgroup changeset +Channel characterised CharString checkmark @@ -999,7 +1000,6 @@ ttyACM ttyACMx ttymxc ttyUSB -TvChannel TXD txt UART diff --git a/docs/guides/python_chip_controller_building.md b/docs/guides/python_chip_controller_building.md index 3bd822f94a872f..d7deba4b07dd49 100644 --- a/docs/guides/python_chip_controller_building.md +++ b/docs/guides/python_chip_controller_building.md @@ -516,7 +516,7 @@ RelativeHumidityMeasurement Scenes SoftwareDiagnostics Switch -TvChannel +Channel TargetNavigator TemperatureMeasurement TestCluster diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 03dc97c466e1aa..e2df810a266196 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -13579,10 +13579,10 @@ ] }, { - "name": "TV Channel", + "name": "Channel", "code": 1284, "mfgCode": null, - "define": "TV_CHANNEL_CLUSTER", + "define": "CHANNEL_CLUSTER", "side": "client", "enabled": 0, "commands": [ @@ -13630,10 +13630,10 @@ ] }, { - "name": "TV Channel", + "name": "Channel", "code": 1284, "mfgCode": null, - "define": "TV_CHANNEL_CLUSTER", + "define": "CHANNEL_CLUSTER", "side": "server", "enabled": 1, "commands": [ diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 49c8bc19a2db46..7b9ebc9a971c74 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -63,7 +63,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thermostat-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thermostat-user-interface-configuration-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/tv-channel-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/channel-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/scenes" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/software-diagnostics-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/switch-server" diff --git a/examples/all-clusters-app/mbed/CMakeLists.txt b/examples/all-clusters-app/mbed/CMakeLists.txt index 2b7e0ccb0183e5..ed3d61123b92d7 100644 --- a/examples/all-clusters-app/mbed/CMakeLists.txt +++ b/examples/all-clusters-app/mbed/CMakeLists.txt @@ -122,7 +122,7 @@ target_sources(${APP_TARGET} PRIVATE ${APP_CLUSTERS}/target-navigator-server/target-navigator-server.cpp ${APP_CLUSTERS}/thermostat-server/thermostat-server.cpp ${APP_CLUSTERS}/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp - ${APP_CLUSTERS}/tv-channel-server/tv-channel-server.cpp + ${APP_CLUSTERS}/channel-server/channel-server.cpp ${APP_CLUSTERS}/operational-credentials-server/operational-credentials-server.cpp ${APP_CLUSTERS}/test-cluster-server/test-cluster-server.cpp ${APP_CLUSTERS}/occupancy-sensor-server/occupancy-sensor-server.cpp diff --git a/examples/chip-tool/templates/tests.js b/examples/chip-tool/templates/tests.js index 148577836863a4..5d286454b31316 100644 --- a/examples/chip-tool/templates/tests.js +++ b/examples/chip-tool/templates/tests.js @@ -171,7 +171,7 @@ function getTests() 'TV_WakeOnLanCluster', 'TV_ApplicationBasicCluster', 'TV_MediaPlaybackCluster', - 'TV_TvChannelCluster', + 'TV_ChannelCluster', 'TV_LowPowerCluster', 'TV_ContentLauncherCluster', 'TV_MediaInputCluster', diff --git a/examples/common/pigweed/protos/attributes_service.proto b/examples/common/pigweed/protos/attributes_service.proto index 2705498450d658..47545290700e2d 100644 --- a/examples/common/pigweed/protos/attributes_service.proto +++ b/examples/common/pigweed/protos/attributes_service.proto @@ -158,7 +158,7 @@ enum ClusterType { ZCL_IAS_ACE_CLUSTER_ID = 0x0501; ZCL_IAS_WD_CLUSTER_ID = 0x0502; ZCL_WAKE_ON_LAN_CLUSTER_ID = 0x0503; - ZCL_TV_CHANNEL_CLUSTER_ID = 0x0504; + ZCL_CHANNEL_CLUSTER_ID = 0x0504; ZCL_TARGET_NAVIGATOR_CLUSTER_ID = 0x0505; ZCL_MEDIA_PLAYBACK_CLUSTER_ID = 0x0506; ZCL_MEDIA_INPUT_CLUSTER_ID = 0x0507; diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 0cdb8d71369ba0..1c115375c385bf 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -12382,10 +12382,10 @@ ] }, { - "name": "TV Channel", + "name": "Channel", "code": 1284, "mfgCode": null, - "define": "TV_CHANNEL_CLUSTER", + "define": "CHANNEL_CLUSTER", "side": "client", "enabled": 0, "commands": [ @@ -12433,10 +12433,10 @@ ] }, { - "name": "TV Channel", + "name": "Channel", "code": 1284, "mfgCode": null, - "define": "TV_CHANNEL_CLUSTER", + "define": "CHANNEL_CLUSTER", "side": "server", "enabled": 0, "commands": [ diff --git a/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/service/MatterServant.java b/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/service/MatterServant.java index aa1cf46ec00903..e6637744ab9dd3 100644 --- a/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/service/MatterServant.java +++ b/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/service/MatterServant.java @@ -9,13 +9,13 @@ import chip.platform.NsdManagerServiceResolver; import chip.platform.PreferencesConfigurationManager; import chip.platform.PreferencesKeyValueStoreManager; +import com.tcl.chip.tvapp.ChannelManagerStub; import com.tcl.chip.tvapp.ContentLaunchManagerStub; import com.tcl.chip.tvapp.KeypadInputManagerStub; import com.tcl.chip.tvapp.LowPowerManagerStub; import com.tcl.chip.tvapp.MediaInputManagerStub; import com.tcl.chip.tvapp.MediaPlaybackManagerStub; import com.tcl.chip.tvapp.TvApp; -import com.tcl.chip.tvapp.TvChannelManagerStub; import com.tcl.chip.tvapp.WakeOnLanManagerStub; public class MatterServant { @@ -38,7 +38,7 @@ public void init(@NonNull Context context) { tvApp.setContentLaunchManager(new ContentLaunchManagerStub()); tvApp.setLowPowerManager(new LowPowerManagerStub()); tvApp.setMediaPlaybackManager(new MediaPlaybackManagerStub()); - tvApp.setTvChannelManager(new TvChannelManagerStub()); + tvApp.setChannelManager(new ChannelManagerStub()); Context applicationContext = context.getApplicationContext(); AndroidChipPlatform chipPlatform = diff --git a/examples/tv-app/android/BUILD.gn b/examples/tv-app/android/BUILD.gn index 5be448221c55dc..d77831c649d5fa 100644 --- a/examples/tv-app/android/BUILD.gn +++ b/examples/tv-app/android/BUILD.gn @@ -38,6 +38,8 @@ shared_library("jni") { "include/endpoint-configuration/EndpointConfigurationStorage.h", "include/target-navigator/TargetNavigatorManager.cpp", "include/target-navigator/TargetNavigatorManager.h", + "java/ChannelManager.cpp", + "java/ChannelManager.h", "java/ContentLauncherManager.cpp", "java/ContentLauncherManager.h", "java/KeypadInputManager.cpp", @@ -49,8 +51,6 @@ shared_library("jni") { "java/MediaPlaybackManager.cpp", "java/MediaPlaybackManager.h", "java/TVApp-JNI.cpp", - "java/TvChannelManager.cpp", - "java/TvChannelManager.h", "java/WakeOnLanManager.cpp", "java/WakeOnLanManager.h", ] @@ -83,6 +83,10 @@ android_library("java") { ] sources = [ + "java/src/com/tcl/chip/tvapp/ChannelInfo.java", + "java/src/com/tcl/chip/tvapp/ChannelLineupInfo.java", + "java/src/com/tcl/chip/tvapp/ChannelManager.java", + "java/src/com/tcl/chip/tvapp/ChannelManagerStub.java", "java/src/com/tcl/chip/tvapp/ContentLaunchBrandingInformation.java", "java/src/com/tcl/chip/tvapp/ContentLaunchManager.java", "java/src/com/tcl/chip/tvapp/ContentLaunchManagerStub.java", @@ -98,10 +102,6 @@ android_library("java") { "java/src/com/tcl/chip/tvapp/MediaPlaybackManager.java", "java/src/com/tcl/chip/tvapp/MediaPlaybackManagerStub.java", "java/src/com/tcl/chip/tvapp/TvApp.java", - "java/src/com/tcl/chip/tvapp/TvChannelInfo.java", - "java/src/com/tcl/chip/tvapp/TvChannelLineupInfo.java", - "java/src/com/tcl/chip/tvapp/TvChannelManager.java", - "java/src/com/tcl/chip/tvapp/TvChannelManagerStub.java", "java/src/com/tcl/chip/tvapp/WakeOnLanManager.java", "java/src/com/tcl/chip/tvapp/WakeOnLanManagerStub.java", ] diff --git a/examples/tv-app/android/java/TvChannelManager.cpp b/examples/tv-app/android/java/ChannelManager.cpp similarity index 70% rename from examples/tv-app/android/java/TvChannelManager.cpp rename to examples/tv-app/android/java/ChannelManager.cpp index 2115716518b5c5..c61afeb1c09823 100644 --- a/examples/tv-app/android/java/TvChannelManager.cpp +++ b/examples/tv-app/android/java/ChannelManager.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "TvChannelManager.h" +#include "ChannelManager.h" #include #include #include @@ -34,34 +34,34 @@ using namespace chip; -TvChannelManager TvChannelManager::sInstance; +ChannelManager ChannelManager::sInstance; class ChannelInfoAttrAccess : public app::AttributeAccessInterface { public: - ChannelInfoAttrAccess() : app::AttributeAccessInterface(Optional::Missing(), app::Clusters::TvChannel::Id) {} + ChannelInfoAttrAccess() : app::AttributeAccessInterface(Optional::Missing(), app::Clusters::Channel::Id) {} CHIP_ERROR Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) override { - if (aPath.mAttributeId == app::Clusters::TvChannel::Attributes::ChannelList::Id) + if (aPath.mAttributeId == app::Clusters::Channel::Attributes::ChannelList::Id) { - return TvChannelMgr().getTvChannelList(aEncoder); + return ChannelMgr().getChannelList(aEncoder); } - else if (aPath.mAttributeId == app::Clusters::TvChannel::Attributes::ChannelLineup::Id) + else if (aPath.mAttributeId == app::Clusters::Channel::Attributes::ChannelLineup::Id) { - return TvChannelMgr().getTvChannelLineup(aEncoder); + return ChannelMgr().getChannelLineup(aEncoder); } - else if (aPath.mAttributeId == app::Clusters::TvChannel::Attributes::CurrentChannel::Id) + else if (aPath.mAttributeId == app::Clusters::Channel::Attributes::CurrentChannel::Id) { - return TvChannelMgr().getCurrentTvChannel(aEncoder); + return ChannelMgr().getCurrentChannel(aEncoder); } return CHIP_NO_ERROR; } }; -ChannelInfoAttrAccess gTvChannelAttrAccess; +ChannelInfoAttrAccess gChannelAttrAccess; -/** @brief Tv Channel Cluster Init +/** @brief Channel Cluster Init * * This function is called when a specific cluster is initialized. It gives the * application an opportunity to take care of cluster initialization procedures. @@ -70,102 +70,101 @@ ChannelInfoAttrAccess gTvChannelAttrAccess; * @param endpoint Ver.: always * */ -void emberAfTvChannelClusterInitCallback(EndpointId endpoint) +void emberAfChannelClusterInitCallback(EndpointId endpoint) { static bool attrAccessRegistered = false; if (!attrAccessRegistered) { - registerAttributeAccessOverride(&gTvChannelAttrAccess); + registerAttributeAccessOverride(&gChannelAttrAccess); attrAccessRegistered = true; } } -TvChannelInfo tvChannelClusterChangeChannel(std::string match) +ChannelInfo ChannelClusterChangeChannel(std::string match) { - return TvChannelMgr().ChangeChannelByMatch(match); + return ChannelMgr().ChangeChannelByMatch(match); } -bool tvChannelClusterChangeChannelByNumber(uint16_t majorNumber, uint16_t minorNumber) +bool ChannelClusterChangeChannelByNumber(uint16_t majorNumber, uint16_t minorNumber) { - return TvChannelMgr().changeChannelByNumber(majorNumber, minorNumber); + return ChannelMgr().changeChannelByNumber(majorNumber, minorNumber); } -bool tvChannelClusterSkipChannel(uint16_t count) +bool ChannelClusterSkipChannel(uint16_t count) { - return TvChannelMgr().skipChannnel(count); + return ChannelMgr().skipChannnel(count); } -void TvChannelManager::InitializeWithObjects(jobject managerObject) +void ChannelManager::InitializeWithObjects(jobject managerObject) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Failed to GetEnvForCurrentThread for TvChannelManager")); + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Failed to GetEnvForCurrentThread for ChannelManager")); - mTvChannelManagerObject = env->NewGlobalRef(managerObject); - VerifyOrReturn(mTvChannelManagerObject != nullptr, ChipLogError(Zcl, "Failed to NewGlobalRef TvChannelManager")); + mChannelManagerObject = env->NewGlobalRef(managerObject); + VerifyOrReturn(mChannelManagerObject != nullptr, ChipLogError(Zcl, "Failed to NewGlobalRef ChannelManager")); - jclass managerClass = env->GetObjectClass(mTvChannelManagerObject); - VerifyOrReturn(managerClass != nullptr, ChipLogError(Zcl, "Failed to get TvChannelManager Java class")); + jclass managerClass = env->GetObjectClass(mChannelManagerObject); + VerifyOrReturn(managerClass != nullptr, ChipLogError(Zcl, "Failed to get ChannelManager Java class")); - mGetChannelListMethod = env->GetMethodID(managerClass, "getChannelList", "()[Lcom/tcl/chip/tvapp/TvChannelInfo;"); + mGetChannelListMethod = env->GetMethodID(managerClass, "getChannelList", "()[Lcom/tcl/chip/tvapp/ChannelInfo;"); if (mGetChannelListMethod == nullptr) { - ChipLogError(Zcl, "Failed to access TvChannelManager 'getChannelList' method"); + ChipLogError(Zcl, "Failed to access ChannelManager 'getChannelList' method"); env->ExceptionClear(); } - mGetLineupMethod = env->GetMethodID(managerClass, "getLineup", "()Lcom/tcl/chip/tvapp/TvChannelLineupInfo;"); + mGetLineupMethod = env->GetMethodID(managerClass, "getLineup", "()Lcom/tcl/chip/tvapp/ChannelLineupInfo;"); if (mGetLineupMethod == nullptr) { - ChipLogError(Zcl, "Failed to access TvChannelManager 'getLineup' method"); + ChipLogError(Zcl, "Failed to access ChannelManager 'getLineup' method"); env->ExceptionClear(); } - mGetCurrentChannelMethod = env->GetMethodID(managerClass, "getCurrentChannel", "()Lcom/tcl/chip/tvapp/TvChannelInfo;"); + mGetCurrentChannelMethod = env->GetMethodID(managerClass, "getCurrentChannel", "()Lcom/tcl/chip/tvapp/ChannelInfo;"); if (mGetCurrentChannelMethod == nullptr) { - ChipLogError(Zcl, "Failed to access TvChannelManager 'getCurrentChannel' method"); + ChipLogError(Zcl, "Failed to access ChannelManager 'getCurrentChannel' method"); env->ExceptionClear(); } - mChangeChannelMethod = - env->GetMethodID(managerClass, "changeChannel", "(Ljava/lang/String;)Lcom/tcl/chip/tvapp/TvChannelInfo;"); + mChangeChannelMethod = env->GetMethodID(managerClass, "changeChannel", "(Ljava/lang/String;)Lcom/tcl/chip/tvapp/ChannelInfo;"); if (mChangeChannelMethod == nullptr) { - ChipLogError(Zcl, "Failed to access TvChannelManager 'changeChannel' method"); + ChipLogError(Zcl, "Failed to access ChannelManager 'changeChannel' method"); env->ExceptionClear(); } mchangeChannelByNumberMethod = env->GetMethodID(managerClass, "changeChannelByNumber", "(II)Z"); if (mchangeChannelByNumberMethod == nullptr) { - ChipLogError(Zcl, "Failed to access TvChannelManager 'changeChannelByNumber' method"); + ChipLogError(Zcl, "Failed to access ChannelManager 'changeChannelByNumber' method"); env->ExceptionClear(); } mskipChannelMethod = env->GetMethodID(managerClass, "skipChannel", "(I)Z"); if (mskipChannelMethod == nullptr) { - ChipLogError(Zcl, "Failed to access TvChannelManager 'skipChannel' method"); + ChipLogError(Zcl, "Failed to access ChannelManager 'skipChannel' method"); env->ExceptionClear(); } } -CHIP_ERROR TvChannelManager::getTvChannelList(chip::app::AttributeValueEncoder & aEncoder) +CHIP_ERROR ChannelManager::getChannelList(chip::app::AttributeValueEncoder & aEncoder) { CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - ChipLogProgress(Zcl, "Received TvChannelManager::getTvChannelList"); - VerifyOrExit(mTvChannelManagerObject != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + ChipLogProgress(Zcl, "Received ChannelManager::getChannelList"); + VerifyOrExit(mChannelManagerObject != nullptr, err = CHIP_ERROR_INCORRECT_STATE); VerifyOrExit(mGetChannelListMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); return aEncoder.EncodeList([env, this](const auto & encoder) -> CHIP_ERROR { - jobjectArray channelInfoList = (jobjectArray) env->CallObjectMethod(mTvChannelManagerObject, mGetChannelListMethod); + jobjectArray channelInfoList = (jobjectArray) env->CallObjectMethod(mChannelManagerObject, mGetChannelListMethod); jint length = env->GetArrayLength(channelInfoList); for (jint i = 0; i < length; i++) { - chip::app::Clusters::TvChannel::Structs::TvChannelInfo::Type channelInfo; + chip::app::Clusters::Channel::Structs::ChannelInfo::Type channelInfo; jobject channelObject = env->GetObjectArrayElement(channelInfoList, i); jclass channelClass = env->GetObjectClass(channelObject); @@ -207,26 +206,26 @@ CHIP_ERROR TvChannelManager::getTvChannelList(chip::app::AttributeValueEncoder & exit: if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "TvChannelManager::getTVChannelList status error: %s", err.AsString()); + ChipLogError(Zcl, "ChannelManager::getChannelList status error: %s", err.AsString()); } return err; } -CHIP_ERROR TvChannelManager::getTvChannelLineup(chip::app::AttributeValueEncoder & aEncoder) +CHIP_ERROR ChannelManager::getChannelLineup(chip::app::AttributeValueEncoder & aEncoder) { CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - ChipLogProgress(Zcl, "Received TvChannelManager::getTvChannelLineup"); - VerifyOrExit(mTvChannelManagerObject != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + ChipLogProgress(Zcl, "Received ChannelManager::getChannelLineup"); + VerifyOrExit(mChannelManagerObject != nullptr, err = CHIP_ERROR_INCORRECT_STATE); VerifyOrExit(mGetLineupMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); { - chip::app::Clusters::TvChannel::Structs::TvChannelLineupInfo::Type channelLineupInfo; + chip::app::Clusters::Channel::Structs::ChannelLineupInfo::Type channelLineupInfo; - jobject channelLineupObject = env->CallObjectMethod(mTvChannelManagerObject, mGetLineupMethod); + jobject channelLineupObject = env->CallObjectMethod(mChannelManagerObject, mGetLineupMethod); jclass channelLineupClazz = env->GetObjectClass(channelLineupObject); jfieldID operatorNameFild = env->GetFieldID(channelLineupClazz, "operatorName", "Ljava/lang/String;"); @@ -255,7 +254,7 @@ CHIP_ERROR TvChannelManager::getTvChannelLineup(chip::app::AttributeValueEncoder jfieldID lineupInfoTypeFild = env->GetFieldID(channelLineupClazz, "lineupInfoType", "I"); jint jlineupInfoType = (env->GetIntField(channelLineupObject, lineupInfoTypeFild)); - channelLineupInfo.lineupInfoType = static_cast(jlineupInfoType); + channelLineupInfo.lineupInfoType = static_cast(jlineupInfoType); ReturnErrorOnFailure(aEncoder.Encode(channelLineupInfo)); @@ -265,25 +264,25 @@ CHIP_ERROR TvChannelManager::getTvChannelLineup(chip::app::AttributeValueEncoder exit: if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "TvChannelManager::getTvChannelLineup status error: %s", err.AsString()); + ChipLogError(Zcl, "ChannelManager::getChannelLineup status error: %s", err.AsString()); } return err; } -CHIP_ERROR TvChannelManager::getCurrentTvChannel(chip::app::AttributeValueEncoder & aEncoder) +CHIP_ERROR ChannelManager::getCurrentChannel(chip::app::AttributeValueEncoder & aEncoder) { CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - ChipLogProgress(Zcl, "Received TvChannelManager::getCurrentTvChannel"); - VerifyOrExit(mTvChannelManagerObject != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + ChipLogProgress(Zcl, "Received ChannelManager::getCurrentChannel"); + VerifyOrExit(mChannelManagerObject != nullptr, err = CHIP_ERROR_INCORRECT_STATE); VerifyOrExit(mGetCurrentChannelMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); { - chip::app::Clusters::TvChannel::Structs::TvChannelInfo::Type channelInfo; + chip::app::Clusters::Channel::Structs::ChannelInfo::Type channelInfo; - jobject channelInfoObject = env->CallObjectMethod(mTvChannelManagerObject, mGetCurrentChannelMethod); + jobject channelInfoObject = env->CallObjectMethod(mChannelManagerObject, mGetCurrentChannelMethod); jclass channelClass = env->GetObjectClass(channelInfoObject); jfieldID getCallSignField = env->GetFieldID(channelClass, "callSign", "Ljava/lang/String;"); @@ -325,29 +324,29 @@ CHIP_ERROR TvChannelManager::getCurrentTvChannel(chip::app::AttributeValueEncode exit: if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "TvChannelManager::getTVChannel status error: %s", err.AsString()); + ChipLogError(Zcl, "ChannelManager::getChannel status error: %s", err.AsString()); } return err; } -TvChannelInfo TvChannelManager::ChangeChannelByMatch(std::string name) +ChannelInfo ChannelManager::ChangeChannelByMatch(std::string name) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - TvChannelInfo channelInfo{ 0, 0 }; + ChannelInfo channelInfo{ 0, 0 }; - ChipLogProgress(Zcl, "Received TvChannelManager::ChangeChannelByMatch name %s", name.c_str()); - VerifyOrExit(mTvChannelManagerObject != nullptr, ChipLogError(Zcl, "mTvChannelManagerObject null")); + ChipLogProgress(Zcl, "Received ChannelManager::ChangeChannelByMatch name %s", name.c_str()); + VerifyOrExit(mChannelManagerObject != nullptr, ChipLogError(Zcl, "mChannelManagerObject null")); VerifyOrExit(mChangeChannelMethod != nullptr, ChipLogError(Zcl, "mChangeChannelMethod null")); VerifyOrExit(env != NULL, ChipLogError(Zcl, "env null")); { UtfString jniname(env, name.c_str()); env->ExceptionClear(); - jobject channelObject = env->CallObjectMethod(mTvChannelManagerObject, mChangeChannelMethod, jniname.jniValue()); + jobject channelObject = env->CallObjectMethod(mChannelManagerObject, mChangeChannelMethod, jniname.jniValue()); if (env->ExceptionCheck()) { - ChipLogError(DeviceLayer, "Java exception in TvChannelManager::ChangeChannelByMatch"); + ChipLogError(DeviceLayer, "Java exception in ChannelManager::ChangeChannelByMatch"); env->ExceptionDescribe(); env->ExceptionClear(); return channelInfo; @@ -391,24 +390,24 @@ TvChannelInfo TvChannelManager::ChangeChannelByMatch(std::string name) return channelInfo; } -bool TvChannelManager::changeChannelByNumber(uint16_t majorNumber, uint16_t minorNumber) +bool ChannelManager::changeChannelByNumber(uint16_t majorNumber, uint16_t minorNumber) { jboolean ret = JNI_FALSE; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - ChipLogProgress(Zcl, "Received TvChannelManager::tvChannelClusterChangeChannelByNumber majorNumber %d, minorNumber %d", - majorNumber, minorNumber); - VerifyOrExit(mTvChannelManagerObject != nullptr, ChipLogError(Zcl, "mTvChannelManagerObject null")); + ChipLogProgress(Zcl, "Received ChannelManager::ChannelClusterChangeChannelByNumber majorNumber %d, minorNumber %d", majorNumber, + minorNumber); + VerifyOrExit(mChannelManagerObject != nullptr, ChipLogError(Zcl, "mChannelManagerObject null")); VerifyOrExit(mchangeChannelByNumberMethod != nullptr, ChipLogError(Zcl, "mchangeChannelByNumberMethod null")); VerifyOrExit(env != NULL, ChipLogError(Zcl, "env null")); env->ExceptionClear(); - ret = env->CallBooleanMethod(mTvChannelManagerObject, mchangeChannelByNumberMethod, static_cast(majorNumber), + ret = env->CallBooleanMethod(mChannelManagerObject, mchangeChannelByNumberMethod, static_cast(majorNumber), static_cast(minorNumber)); if (env->ExceptionCheck()) { - ChipLogError(DeviceLayer, "Java exception in TvChannelManager::changeChannelByNumber"); + ChipLogError(DeviceLayer, "Java exception in ChannelManager::changeChannelByNumber"); env->ExceptionDescribe(); env->ExceptionClear(); return false; @@ -418,22 +417,22 @@ bool TvChannelManager::changeChannelByNumber(uint16_t majorNumber, uint16_t mino return static_cast(ret); } -bool TvChannelManager::skipChannnel(uint16_t count) +bool ChannelManager::skipChannnel(uint16_t count) { jboolean ret = JNI_FALSE; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - ChipLogProgress(Zcl, "Received TvChannelManager::skipChannnel count %d", count); - VerifyOrExit(mTvChannelManagerObject != nullptr, ChipLogError(Zcl, "mTvChannelManagerObject null")); + ChipLogProgress(Zcl, "Received ChannelManager::skipChannnel count %d", count); + VerifyOrExit(mChannelManagerObject != nullptr, ChipLogError(Zcl, "mChannelManagerObject null")); VerifyOrExit(mskipChannelMethod != nullptr, ChipLogError(Zcl, "mskipChannelMethod null")); VerifyOrExit(env != NULL, ChipLogError(Zcl, "env null")); env->ExceptionClear(); - ret = env->CallBooleanMethod(mTvChannelManagerObject, mskipChannelMethod, static_cast(count)); + ret = env->CallBooleanMethod(mChannelManagerObject, mskipChannelMethod, static_cast(count)); if (env->ExceptionCheck()) { - ChipLogError(DeviceLayer, "Java exception in TvChannelManager::SkipChannel"); + ChipLogError(DeviceLayer, "Java exception in ChannelManager::SkipChannel"); env->ExceptionDescribe(); env->ExceptionClear(); return false; diff --git a/examples/tv-app/android/java/TvChannelManager.h b/examples/tv-app/android/java/ChannelManager.h similarity index 72% rename from examples/tv-app/android/java/TvChannelManager.h rename to examples/tv-app/android/java/ChannelManager.h index 7d9ad650066626..a097bb17488297 100644 --- a/examples/tv-app/android/java/TvChannelManager.h +++ b/examples/tv-app/android/java/ChannelManager.h @@ -25,23 +25,23 @@ #include #include -class TvChannelManager +class ChannelManager { public: void InitializeWithObjects(jobject managerObject); - CHIP_ERROR getTvChannelList(chip::app::AttributeValueEncoder & aEncoder); - CHIP_ERROR getTvChannelLineup(chip::app::AttributeValueEncoder & aEncoder); - CHIP_ERROR getCurrentTvChannel(chip::app::AttributeValueEncoder & aEncoder); + CHIP_ERROR getChannelList(chip::app::AttributeValueEncoder & aEncoder); + CHIP_ERROR getChannelLineup(chip::app::AttributeValueEncoder & aEncoder); + CHIP_ERROR getCurrentChannel(chip::app::AttributeValueEncoder & aEncoder); - TvChannelInfo ChangeChannelByMatch(std::string name); + ChannelInfo ChangeChannelByMatch(std::string name); bool changeChannelByNumber(uint16_t majorNumber, uint16_t minorNumber); bool skipChannnel(uint16_t count); private: - friend TvChannelManager & TvChannelMgr(); + friend ChannelManager & ChannelMgr(); - static TvChannelManager sInstance; - jobject mTvChannelManagerObject = nullptr; + static ChannelManager sInstance; + jobject mChannelManagerObject = nullptr; jmethodID mGetChannelListMethod = nullptr; jmethodID mGetLineupMethod = nullptr; jmethodID mGetCurrentChannelMethod = nullptr; @@ -51,7 +51,7 @@ class TvChannelManager jmethodID mskipChannelMethod = nullptr; }; -inline class TvChannelManager & TvChannelMgr() +inline class ChannelManager & ChannelMgr() { - return TvChannelManager::sInstance; + return ChannelManager::sInstance; } diff --git a/examples/tv-app/android/java/TVApp-JNI.cpp b/examples/tv-app/android/java/TVApp-JNI.cpp index accd4a0ccc5cb0..6a637c0e168688 100644 --- a/examples/tv-app/android/java/TVApp-JNI.cpp +++ b/examples/tv-app/android/java/TVApp-JNI.cpp @@ -16,12 +16,12 @@ * */ +#include "ChannelManager.h" #include "ContentLauncherManager.h" #include "KeypadInputManager.h" #include "LowPowerManager.h" #include "MediaInputManager.h" #include "MediaPlaybackManager.h" -#include "TvChannelManager.h" #include "WakeOnLanManager.h" #include #include @@ -70,7 +70,7 @@ JNI_METHOD(void, setMediaPlaybackManager)(JNIEnv *, jobject, jobject manager) MediaPlaybackMgr().InitializeWithObjects(manager); } -JNI_METHOD(void, setTvChannelManager)(JNIEnv *, jobject, jobject manager) +JNI_METHOD(void, setChannelManager)(JNIEnv *, jobject, jobject manager) { - TvChannelMgr().InitializeWithObjects(manager); + ChannelMgr().InitializeWithObjects(manager); } diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelInfo.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelInfo.java similarity index 92% rename from examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelInfo.java rename to examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelInfo.java index da087c9fa87ead..b383b789a9d78c 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelInfo.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelInfo.java @@ -17,16 +17,16 @@ */ package com.tcl.chip.tvapp; -public class TvChannelInfo { +public class ChannelInfo { public int majorNumber; public int minorNumber; public String name; public String callSign; public String affiliateCallSign; - public TvChannelInfo() {} + public ChannelInfo() {} - public TvChannelInfo( + public ChannelInfo( int majorNumber, int minorNumber, String name, String callSign, String affiliateCallSign) { this.majorNumber = majorNumber; this.minorNumber = minorNumber; @@ -37,7 +37,7 @@ public TvChannelInfo( @Override public String toString() { - return "TvChannelInfo{" + return "ChannelInfo{" + "majorNumber=" + majorNumber + ", minorNumber=" diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelLineupInfo.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelLineupInfo.java similarity index 88% rename from examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelLineupInfo.java rename to examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelLineupInfo.java index 0a8dffe9876036..d04662d6c2f93e 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelLineupInfo.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelLineupInfo.java @@ -17,7 +17,7 @@ */ package com.tcl.chip.tvapp; -public class TvChannelLineupInfo { +public class ChannelLineupInfo { public static final int LINEUP_INFO_TYPE_MSO = 0x00; public String operatorName; @@ -25,11 +25,11 @@ public class TvChannelLineupInfo { public String postalCode; public int lineupInfoType; - public TvChannelLineupInfo(String operatorName, String lineupName, String postalCode) { + public ChannelLineupInfo(String operatorName, String lineupName, String postalCode) { this(operatorName, lineupName, postalCode, LINEUP_INFO_TYPE_MSO); } - public TvChannelLineupInfo( + public ChannelLineupInfo( String operatorName, String lineupName, String postalCode, int lineupInfoType) { this.operatorName = operatorName; this.lineupName = lineupName; @@ -39,7 +39,7 @@ public TvChannelLineupInfo( @Override public String toString() { - return "TvChannelLineupInfo{" + return "ChannelLineupInfo{" + "operatorName='" + operatorName + '\'' diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelManager.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelManager.java similarity index 80% rename from examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelManager.java rename to examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelManager.java index 3eedb1afbd6b1b..69cfc39c92a946 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelManager.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelManager.java @@ -17,15 +17,15 @@ */ package com.tcl.chip.tvapp; -public interface TvChannelManager { +public interface ChannelManager { - TvChannelInfo[] getChannelList(); + ChannelInfo[] getChannelList(); - TvChannelLineupInfo getLineup(); + ChannelLineupInfo getLineup(); - TvChannelInfo getCurrentChannel(); + ChannelInfo getCurrentChannel(); - TvChannelInfo changeChannel(String match); + ChannelInfo changeChannel(String match); boolean changeChannelByNumber(int majorNumber, int minorNumber); diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelManagerStub.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelManagerStub.java similarity index 57% rename from examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelManagerStub.java rename to examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelManagerStub.java index c72ab4fe8605d2..2b76098750595b 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelManagerStub.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ChannelManagerStub.java @@ -19,36 +19,34 @@ import android.util.Log; -public class TvChannelManagerStub implements TvChannelManager { +public class ChannelManagerStub implements ChannelManager { private static final String TAG = "ChannelManagerStub"; @Override - public TvChannelInfo[] getChannelList() { - TvChannelInfo tvChannelInfo1 = - new TvChannelInfo(1, 1, "HDMI1", "callSign1", "affiliateCallSign1"); - TvChannelInfo tvChannelInfo2 = - new TvChannelInfo(2, 2, "HDMI2", "callSign2", "affiliateCallSign2"); - Log.d(TAG, "getTVChannelList"); - return new TvChannelInfo[] {tvChannelInfo1, tvChannelInfo2}; + public ChannelInfo[] getChannelList() { + ChannelInfo ChannelInfo1 = new ChannelInfo(1, 1, "HDMI1", "callSign1", "affiliateCallSign1"); + ChannelInfo ChannelInfo2 = new ChannelInfo(2, 2, "HDMI2", "callSign2", "affiliateCallSign2"); + Log.d(TAG, "getChannelList"); + return new ChannelInfo[] {ChannelInfo1, ChannelInfo2}; } @Override - public TvChannelLineupInfo getLineup() { - TvChannelLineupInfo lineupInfo = new TvChannelLineupInfo("operator", "lineup", "postalCode"); - Log.d(TAG, "getTVChannelLineup: " + lineupInfo); + public ChannelLineupInfo getLineup() { + ChannelLineupInfo lineupInfo = new ChannelLineupInfo("operator", "lineup", "postalCode"); + Log.d(TAG, "getChannelLineup: " + lineupInfo); return lineupInfo; } @Override - public TvChannelInfo getCurrentChannel() { - Log.d(TAG, "getCurrentTVChannel: "); - return new TvChannelInfo(1, 1, "HDMI", "callSign", "affiliateCallSign"); + public ChannelInfo getCurrentChannel() { + Log.d(TAG, "getCurrentChannel: "); + return new ChannelInfo(1, 1, "HDMI", "callSign", "affiliateCallSign"); } @Override - public TvChannelInfo changeChannel(String match) { + public ChannelInfo changeChannel(String match) { Log.d(TAG, "changeChannel: " + match); - return new TvChannelInfo(1, 1, "HDMI", "callSign", "affiliateCallSign"); + return new ChannelInfo(1, 1, "HDMI", "callSign", "affiliateCallSign"); } @Override diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvApp.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvApp.java index f41b974a82d090..521a1c1dee70d7 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvApp.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvApp.java @@ -32,7 +32,7 @@ public TvApp() {} public native void setMediaPlaybackManager(MediaPlaybackManager manager); - public native void setTvChannelManager(TvChannelManager manager); + public native void setChannelManager(ChannelManager manager); static { System.loadLibrary("TvApp"); diff --git a/examples/tv-app/linux/AppImpl.cpp b/examples/tv-app/linux/AppImpl.cpp index 437cb7379527a1..2f43c406f04358 100644 --- a/examples/tv-app/linux/AppImpl.cpp +++ b/examples/tv-app/linux/AppImpl.cpp @@ -128,9 +128,9 @@ DECLARE_DYNAMIC_ATTRIBUTE(ZCL_TARGET_NAVIGATOR_LIST_ATTRIBUTE_ID, ARRAY, kDescri // Declare Channel cluster attributes DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(channelAttrs) -DECLARE_DYNAMIC_ATTRIBUTE(ZCL_TV_CHANNEL_LIST_ATTRIBUTE_ID, ARRAY, kDescriptorAttributeArraySize, 0), /* channel list */ - DECLARE_DYNAMIC_ATTRIBUTE(ZCL_TV_CHANNEL_LINEUP_ATTRIBUTE_ID, STRUCT, 1, 0), /* lineup */ - DECLARE_DYNAMIC_ATTRIBUTE(ZCL_TV_CHANNEL_CURRENT_CHANNEL_ATTRIBUTE_ID, STRUCT, 1, 0), /* current channel */ +DECLARE_DYNAMIC_ATTRIBUTE(ZCL_CHANNEL_LIST_ATTRIBUTE_ID, ARRAY, kDescriptorAttributeArraySize, 0), /* channel list */ + DECLARE_DYNAMIC_ATTRIBUTE(ZCL_CHANNEL_LINEUP_ATTRIBUTE_ID, STRUCT, 1, 0), /* lineup */ + DECLARE_DYNAMIC_ATTRIBUTE(ZCL_CHANNEL_CURRENT_CHANNEL_ATTRIBUTE_ID, STRUCT, 1, 0), /* current channel */ DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); // Declare Cluster List for Content App endpoint @@ -143,7 +143,7 @@ DECLARE_DYNAMIC_CLUSTER(ZCL_DESCRIPTOR_CLUSTER_ID, descriptorAttrs), DECLARE_DYNAMIC_CLUSTER(ZCL_CONTENT_LAUNCH_CLUSTER_ID, contentLauncherAttrs), DECLARE_DYNAMIC_CLUSTER(ZCL_MEDIA_PLAYBACK_CLUSTER_ID, mediaPlaybackAttrs), DECLARE_DYNAMIC_CLUSTER(ZCL_TARGET_NAVIGATOR_CLUSTER_ID, targetNavigatorAttrs), - DECLARE_DYNAMIC_CLUSTER(ZCL_TV_CHANNEL_CLUSTER_ID, channelAttrs) DECLARE_DYNAMIC_CLUSTER_LIST_END; + DECLARE_DYNAMIC_CLUSTER(ZCL_CHANNEL_CLUSTER_ID, channelAttrs) DECLARE_DYNAMIC_CLUSTER_LIST_END; // Declare Content App endpoint DECLARE_DYNAMIC_ENDPOINT(contentAppEndpoint, contentAppClusters); diff --git a/examples/tv-app/linux/BUILD.gn b/examples/tv-app/linux/BUILD.gn index 98beeb571f033b..bbdaa76c154c84 100644 --- a/examples/tv-app/linux/BUILD.gn +++ b/examples/tv-app/linux/BUILD.gn @@ -34,6 +34,8 @@ executable("chip-tv-app") { "include/application-launcher/ApplicationLauncherManager.h", "include/audio-output/AudioOutputManager.cpp", "include/audio-output/AudioOutputManager.h", + "include/channel/ChannelManager.cpp", + "include/channel/ChannelManager.h", "include/cluster-change-attribute.cpp", "include/cluster-init.cpp", "include/content-launcher/ContentLauncherManager.cpp", @@ -50,8 +52,6 @@ executable("chip-tv-app") { "include/media-playback/MediaPlaybackManager.h", "include/target-navigator/TargetNavigatorManager.cpp", "include/target-navigator/TargetNavigatorManager.h", - "include/tv-channel/TvChannelManager.cpp", - "include/tv-channel/TvChannelManager.h", "include/wake-on-lan/WakeOnLanManager.cpp", "include/wake-on-lan/WakeOnLanManager.h", "main.cpp", diff --git a/examples/tv-app/linux/include/tv-channel/TvChannelManager.cpp b/examples/tv-app/linux/include/channel/ChannelManager.cpp similarity index 81% rename from examples/tv-app/linux/include/tv-channel/TvChannelManager.cpp rename to examples/tv-app/linux/include/channel/ChannelManager.cpp index 28ecf0e74d7814..1300281fe0aec7 100644 --- a/examples/tv-app/linux/include/tv-channel/TvChannelManager.cpp +++ b/examples/tv-app/linux/include/channel/ChannelManager.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "TvChannelManager.h" +#include "ChannelManager.h" #include #include #include @@ -30,7 +30,7 @@ using namespace chip; -CHIP_ERROR TvChannelManager::Init() +CHIP_ERROR ChannelManager::Init() { CHIP_ERROR err = CHIP_NO_ERROR; // TODO: Store feature map once it is supported @@ -43,7 +43,7 @@ CHIP_ERROR TvChannelManager::Init() return err; } -CHIP_ERROR TvChannelManager::proxyGetTvChannelList(chip::EndpointId mEndpointId, chip::app::AttributeValueEncoder & aEncoder) +CHIP_ERROR ChannelManager::proxyGetChannelList(chip::EndpointId mEndpointId, chip::app::AttributeValueEncoder & aEncoder) { return aEncoder.EncodeList([](const auto & encoder) -> CHIP_ERROR { // TODO: Insert code here @@ -54,7 +54,7 @@ CHIP_ERROR TvChannelManager::proxyGetTvChannelList(chip::EndpointId mEndpointId, for (int i = 0; i < maximumVectorSize; ++i) { - chip::app::Clusters::TvChannel::Structs::TvChannelInfo::Type channelInfo; + chip::app::Clusters::Channel::Structs::ChannelInfo::Type channelInfo; channelInfo.affiliateCallSign = CharSpan(affiliateCallSign, sizeof(affiliateCallSign) - 1); channelInfo.callSign = CharSpan(callSign, sizeof(callSign) - 1); channelInfo.name = CharSpan(name, sizeof(name) - 1); @@ -66,18 +66,18 @@ CHIP_ERROR TvChannelManager::proxyGetTvChannelList(chip::EndpointId mEndpointId, }); } -TvChannelInfo tvChannelClusterChangeChannel(std::string match) +ChannelInfo ChannelClusterChangeChannel(std::string match) { // TODO: Insert code here - TvChannelInfo channel = {}; + ChannelInfo channel = {}; return channel; } -bool tvChannelClusterChangeChannelByNumber(uint16_t majorNumber, uint16_t minorNumber) +bool ChannelClusterChangeChannelByNumber(uint16_t majorNumber, uint16_t minorNumber) { // TODO: Insert code here return true; } -bool tvChannelClusterSkipChannel(uint16_t count) +bool ChannelClusterSkipChannel(uint16_t count) { // TODO: Insert code here return true; diff --git a/examples/tv-app/linux/include/tv-channel/TvChannelManager.h b/examples/tv-app/linux/include/channel/ChannelManager.h similarity index 85% rename from examples/tv-app/linux/include/tv-channel/TvChannelManager.h rename to examples/tv-app/linux/include/channel/ChannelManager.h index 5b0e4ed7027df3..9c65bcbd44e0a4 100644 --- a/examples/tv-app/linux/include/tv-channel/TvChannelManager.h +++ b/examples/tv-app/linux/include/channel/ChannelManager.h @@ -23,9 +23,9 @@ #include #include -class TvChannelManager +class ChannelManager { public: CHIP_ERROR Init(); - CHIP_ERROR proxyGetTvChannelList(chip::EndpointId mEndpointId, chip::app::AttributeValueEncoder & aEncoder); + CHIP_ERROR proxyGetChannelList(chip::EndpointId mEndpointId, chip::app::AttributeValueEncoder & aEncoder); }; diff --git a/examples/tv-app/linux/include/cluster-init.cpp b/examples/tv-app/linux/include/cluster-init.cpp index 54d6b1dab412a0..552491f964c18b 100644 --- a/examples/tv-app/linux/include/cluster-init.cpp +++ b/examples/tv-app/linux/include/cluster-init.cpp @@ -19,10 +19,10 @@ #include "application-basic/ApplicationBasicManager.h" #include "application-launcher/ApplicationLauncherManager.h" #include "audio-output/AudioOutputManager.h" +#include "channel/ChannelManager.h" #include "content-launcher/ContentLauncherManager.h" #include "media-input/MediaInputManager.h" #include "target-navigator/TargetNavigatorManager.h" -#include "tv-channel/TvChannelManager.h" #include "wake-on-lan/WakeOnLanManager.h" #include @@ -108,13 +108,12 @@ void emberAfWakeOnLanClusterInitCallback(chip::EndpointId endpoint) namespace { -TvAttrAccess - gTvChannelAttrAccess; +TvAttrAccess + gChannelAttrAccess; } // anonymous namespace -/** @brief Tv Channel Cluster Init +/** @brief Channel Cluster Init * * This function is called when a specific cluster is initialized. It gives the * application an opportunity to take care of cluster initialization procedures. @@ -123,12 +122,12 @@ TvAttrAccess @@ -89,8 +89,8 @@ int main(int argc, char * argv[]) err = TargetNavigatorManager().Init(); SuccessOrExit(err); - // Init Tv Channel Manager - err = TvChannelManager().Init(); + // Init Channel Manager + err = ChannelManager().Init(); SuccessOrExit(err); VerifyOrDie(ChipLinuxAppInit(argc, argv) == 0); diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index e513682c2951b4..85b4343b78a467 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -6945,10 +6945,10 @@ ] }, { - "name": "TV Channel", + "name": "Channel", "code": 1284, "mfgCode": null, - "define": "TV_CHANNEL_CLUSTER", + "define": "CHANNEL_CLUSTER", "side": "client", "enabled": 0, "commands": [ @@ -6996,10 +6996,10 @@ ] }, { - "name": "TV Channel", + "name": "Channel", "code": 1284, "mfgCode": null, - "define": "TV_CHANNEL_CLUSTER", + "define": "CHANNEL_CLUSTER", "side": "server", "enabled": 1, "commands": [ diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index 25e30e2dc6c026..1f6c9108260d94 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -11849,10 +11849,10 @@ ] }, { - "name": "TV Channel", + "name": "Channel", "code": 1284, "mfgCode": null, - "define": "TV_CHANNEL_CLUSTER", + "define": "CHANNEL_CLUSTER", "side": "client", "enabled": 0, "commands": [ @@ -11900,10 +11900,10 @@ ] }, { - "name": "TV Channel", + "name": "Channel", "code": 1284, "mfgCode": null, - "define": "TV_CHANNEL_CLUSTER", + "define": "CHANNEL_CLUSTER", "side": "server", "enabled": 1, "commands": [ diff --git a/src/app/clusters/tv-channel-server/tv-channel-server.cpp b/src/app/clusters/channel-server/channel-server.cpp similarity index 72% rename from src/app/clusters/tv-channel-server/tv-channel-server.cpp rename to src/app/clusters/channel-server/channel-server.cpp index 04674ba566095c..c3d9629ab93f04 100644 --- a/src/app/clusters/tv-channel-server/tv-channel-server.cpp +++ b/src/app/clusters/channel-server/channel-server.cpp @@ -46,14 +46,14 @@ using namespace chip; using namespace chip::app::Clusters; -using namespace chip::app::Clusters::TvChannel; +using namespace chip::app::Clusters::Channel; -::TvChannelInfo tvChannelClusterChangeChannel(std::string match); -bool tvChannelClusterChangeChannelByNumber(uint16_t majorNumer, uint16_t minorNumber); -bool tvChannelClusterSkipChannel(uint16_t count); +::ChannelInfo ChannelClusterChangeChannel(std::string match); +bool ChannelClusterChangeChannelByNumber(uint16_t majorNumer, uint16_t minorNumber); +bool ChannelClusterSkipChannel(uint16_t count); -bool emberAfTvChannelClusterChangeChannelCallback(app::CommandHandler * command, const app::ConcreteCommandPath & commandPath, - const Commands::ChangeChannel::DecodableType & commandData) +bool emberAfChannelClusterChangeChannelCallback(app::CommandHandler * command, const app::ConcreteCommandPath & commandPath, + const Commands::ChangeChannel::DecodableType & commandData) { Commands::ChangeChannelResponse::Type response; response.channelMatch.majorNumber = 1; @@ -61,7 +61,7 @@ bool emberAfTvChannelClusterChangeChannelCallback(app::CommandHandler * command, response.channelMatch.name = chip::CharSpan("name", strlen("name")); response.channelMatch.callSign = chip::CharSpan("callSign", strlen("callSign")); response.channelMatch.affiliateCallSign = chip::CharSpan("affiliateCallSign", strlen("affiliateCallSign")); - response.errorType = (TvChannelErrorType) 0; + response.errorType = (ChannelErrorType) 0; CHIP_ERROR err = command->AddResponseData(commandPath, response); if (err != CHIP_NO_ERROR) @@ -71,28 +71,27 @@ bool emberAfTvChannelClusterChangeChannelCallback(app::CommandHandler * command, return true; } -bool emberAfTvChannelClusterChangeChannelByNumberCallback(app::CommandHandler * command, - const app::ConcreteCommandPath & commandPath, - const Commands::ChangeChannelByNumber::DecodableType & commandData) +bool emberAfChannelClusterChangeChannelByNumberCallback(app::CommandHandler * command, const app::ConcreteCommandPath & commandPath, + const Commands::ChangeChannelByNumber::DecodableType & commandData) { auto & majorNumber = commandData.majorNumber; auto & minorNumber = commandData.minorNumber; - bool success = tvChannelClusterChangeChannelByNumber(majorNumber, minorNumber); + bool success = ChannelClusterChangeChannelByNumber(majorNumber, minorNumber); EmberAfStatus status = success ? EMBER_ZCL_STATUS_SUCCESS : EMBER_ZCL_STATUS_FAILURE; emberAfSendImmediateDefaultResponse(status); return true; } -bool emberAfTvChannelClusterSkipChannelCallback(app::CommandHandler * command, const app::ConcreteCommandPath & commandPath, - const Commands::SkipChannel::DecodableType & commandData) +bool emberAfChannelClusterSkipChannelCallback(app::CommandHandler * command, const app::ConcreteCommandPath & commandPath, + const Commands::SkipChannel::DecodableType & commandData) { auto & count = commandData.count; - bool success = tvChannelClusterSkipChannel(count); + bool success = ChannelClusterSkipChannel(count); EmberAfStatus status = success ? EMBER_ZCL_STATUS_SUCCESS : EMBER_ZCL_STATUS_FAILURE; emberAfSendImmediateDefaultResponse(status); return true; } -void MatterTvChannelPluginServerInitCallback() {} +void MatterChannelPluginServerInitCallback() {} diff --git a/src/app/tests/suites/TV_TvChannelCluster.yaml b/src/app/tests/suites/TV_ChannelCluster.yaml similarity index 96% rename from src/app/tests/suites/TV_TvChannelCluster.yaml rename to src/app/tests/suites/TV_ChannelCluster.yaml index 27e9af3bd4a813..0d93b9f1aceea3 100644 --- a/src/app/tests/suites/TV_TvChannelCluster.yaml +++ b/src/app/tests/suites/TV_ChannelCluster.yaml @@ -12,10 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: TV Channel Cluster Tests +name: Channel Cluster Tests config: - cluster: "TV Channel" + cluster: "Channel" endpoint: 1 tests: @@ -23,7 +23,7 @@ tests: cluster: "DelayCommands" command: "WaitForCommissionee" - - label: "Read attribute TV Channel list" + - label: "Read attribute Channel list" command: "readAttribute" attribute: "Channel list" response: diff --git a/src/app/zap-templates/zcl/data-model/all.xml b/src/app/zap-templates/zcl/data-model/all.xml index feb167213830c0..36e7de9c6e0905 100644 --- a/src/app/zap-templates/zcl/data-model/all.xml +++ b/src/app/zap-templates/zcl/data-model/all.xml @@ -55,7 +55,7 @@ - + diff --git a/src/app/zap-templates/zcl/data-model/chip/tv-channel-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml similarity index 69% rename from src/app/zap-templates/zcl/data-model/chip/tv-channel-cluster.xml rename to src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml index 8a19be92066061..64c2dd05de2015 100644 --- a/src/app/zap-templates/zcl/data-model/chip/tv-channel-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml @@ -18,24 +18,24 @@ limitations under the License. Media - TV Channel + Channel 0x0504 - TV_CHANNEL_CLUSTER + CHANNEL_CLUSTER true true - This cluster provides an interface for controlling the current TV Channel on a device. - channel list - channel lineup - current channel + This cluster provides an interface for controlling the current Channel on a device. + channel list + channel lineup + current channel - Change the channel on the TV to the channel case-insensitive exact matching the value passed as an argument. + Change the channel on the media player to the channel case-insensitive exact matching the value passed as an argument. - Change the channel on the TV to the channel with the given Number in the ChannelList attribute. + Change the channel on the media plaeyer to the channel with the given Number in the ChannelList attribute. @@ -47,13 +47,13 @@ limitations under the License. Upon receipt, this SHALL display the active status of the input list on screen. - - + + - + @@ -62,20 +62,20 @@ limitations under the License. - + - + - + - + diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index 6ef03a94167223..23e5d63e6840de 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -15,6 +15,7 @@ "bridged-device-basic.xml", "chip-ota.xml", "chip-types.xml", + "channel-cluster.xml", "clusters-extensions.xml", "commissioning.xml", "content-launch-cluster.xml", @@ -57,7 +58,6 @@ "thermostat-cluster.xml", "thread-network-diagnostics-cluster.xml", "time-synchronization-cluster.xml", - "tv-channel-cluster.xml", "user-label-cluster.xml", "wake-on-lan-cluster.xml", "wifi-network-diagnostics-cluster.xml", diff --git a/src/app/zap_cluster_list.py b/src/app/zap_cluster_list.py index 0e77cf7d61e54e..c1562d6855a38b 100755 --- a/src/app/zap_cluster_list.py +++ b/src/app/zap_cluster_list.py @@ -23,6 +23,7 @@ 'BOOLEAN_STATE_CLUSTER': [], 'BRIDGED_ACTIONS_CLUSTER': [], 'BRIDGED_DEVICE_BASIC_CLUSTER': [], + 'CHANNEL_CLUSTER': ['channel-server'], 'COLOR_CONTROL_CLUSTER': ['color-control-server'], 'COMMISSIONING_CLUSTER': [], 'CONTENT_LAUNCH_CLUSTER': ['content-launch-server'], @@ -81,7 +82,6 @@ 'THREAD_NETWORK_DIAGNOSTICS_CLUSTER': ['thread-network-diagnostics-server'], 'TIME_CLUSTER': [], 'TIME_SYNCHRONIZATION_CLUSTER': [], - 'TV_CHANNEL_CLUSTER': ['tv-channel-server'], 'USER_LABEL_CLUSTER': ['user-label-server'], 'WAKE_ON_LAN_CLUSTER': [], 'WIFI_NETWORK_DIAGNOSTICS_CLUSTER': ['wifi-network-diagnostics-server'], @@ -105,6 +105,7 @@ 'BOOLEAN_STATE_CLUSTER': [], 'BRIDGED_ACTIONS_CLUSTER': [], 'BRIDGED_DEVICE_BASIC_CLUSTER': [], + 'CHANNEL_CLUSTER': [], 'COLOR_CONTROL_CLUSTER': [], 'COMMISSIONING_CLUSTER': [], 'CONTENT_LAUNCH_CLUSTER': [], @@ -164,7 +165,6 @@ 'TIME_CLUSTER': [], 'TIME_SYNCHRONIZATION_CLUSTER': [], 'TRUSTED_ROOT_CERTIFICATES_CLUSTER': [], - 'TV_CHANNEL_CLUSTER': [], 'USER_LABEL_CLUSTER': [], 'WAKE_ON_LAN_CLUSTER': [], 'WIFI_NETWORK_DIAGNOSTICS_CLUSTER': [], diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index eae49e72cf466e..592080c9263212 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -10634,10 +10634,10 @@ ] }, { - "name": "TV Channel", + "name": "Channel", "code": 1284, "mfgCode": null, - "define": "TV_CHANNEL_CLUSTER", + "define": "CHANNEL_CLUSTER", "side": "client", "enabled": 1, "commands": [ @@ -10685,10 +10685,10 @@ ] }, { - "name": "TV Channel", + "name": "Channel", "code": 1284, "mfgCode": null, - "define": "TV_CHANNEL_CLUSTER", + "define": "CHANNEL_CLUSTER", "side": "server", "enabled": 0, "commands": [ diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index 20da60db5d9177..ad02a448a0211f 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -185,6 +185,15 @@ typedef void (*CHIPBridgedDeviceBasicClusterAttributeListAttributeCallbackType)( void *, const chip::app::Clusters::BridgedDeviceBasic::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPBridgedDeviceBasicClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo::DecodableArgType); +typedef void (*CHIPChannelClusterChangeChannelResponseCallbackType)( + void *, const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType &); + +typedef void (*CHIPChannelClusterChannelListAttributeCallbackType)( + void *, const chip::app::Clusters::Channel::Attributes::ChannelList::TypeInfo::DecodableType &); +typedef void (*CHIPChannelClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::Channel::Attributes::AttributeList::TypeInfo::DecodableType &); +typedef void (*CHIPChannelClusterClusterRevisionAttributeCallbackType)( + void *, chip::app::Clusters::Channel::Attributes::ClusterRevision::TypeInfo::DecodableArgType); typedef void (*CHIPColorControlClusterCurrentHueAttributeCallbackType)( void *, chip::app::Clusters::ColorControl::Attributes::CurrentHue::TypeInfo::DecodableArgType); @@ -909,15 +918,6 @@ typedef void (*CHIPSwitchClusterFeatureMapAttributeCallbackType)( void *, chip::app::Clusters::Switch::Attributes::FeatureMap::TypeInfo::DecodableArgType); typedef void (*CHIPSwitchClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::Switch::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPTvChannelClusterChangeChannelResponseCallbackType)( - void *, const chip::app::Clusters::TvChannel::Commands::ChangeChannelResponse::DecodableType &); - -typedef void (*CHIPTvChannelClusterChannelListAttributeCallbackType)( - void *, const chip::app::Clusters::TvChannel::Attributes::ChannelList::TypeInfo::DecodableType &); -typedef void (*CHIPTvChannelClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::TvChannel::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPTvChannelClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::TvChannel::Attributes::ClusterRevision::TypeInfo::DecodableArgType); typedef void (*CHIPTargetNavigatorClusterNavigateTargetResponseCallbackType)( void *, const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType &); diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index 7a324bb99130a4..6858e8dac9c58e 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -3219,6 +3219,169 @@ JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(jlong, ChannelCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + ChannelCluster * cppCluster = new ChannelCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, ChannelCluster, changeChannel)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring match) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + ChannelCluster * cppCluster; + + chip::app::Clusters::Channel::Commands::ChangeChannel::Type request; + + request.match = chip::JniUtfString(env, static_cast(match)).charSpan(); + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + VerifyOrReturn(onFailure.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, ChannelCluster, changeChannelByNumber) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject majorNumber, jobject minorNumber) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + ChannelCluster * cppCluster; + + chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type request; + + request.majorNumber = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(majorNumber)); + request.minorNumber = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(minorNumber)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + VerifyOrReturn(onFailure.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, ChannelCluster, skipChannel)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject count) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + ChannelCluster * cppCluster; + + chip::app::Clusters::Channel::Commands::SkipChannel::Type request; + + request.count = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(count)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + VerifyOrReturn(onFailure.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, ChannelCluster, subscribeClusterRevisionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ChannelCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::Channel::Attributes::ClusterRevision::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(jlong, ColorControlCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; @@ -17913,170 +18076,6 @@ JNI_METHOD(void, SwitchCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, TvChannelCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - TvChannelCluster * cppCluster = new TvChannelCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, TvChannelCluster, changeChannel)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring match) -{ - chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TvChannelCluster * cppCluster; - - chip::app::Clusters::TvChannel::Commands::ChangeChannel::Type request; - - request.match = chip::JniUtfString(env, static_cast(match)).charSpan(); - - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - - cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); - - onSuccess.release(); - onFailure.release(); -} -JNI_METHOD(void, TvChannelCluster, changeChannelByNumber) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject majorNumber, jobject minorNumber) -{ - chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TvChannelCluster * cppCluster; - - chip::app::Clusters::TvChannel::Commands::ChangeChannelByNumber::Type request; - - request.majorNumber = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(majorNumber)); - request.minorNumber = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(minorNumber)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - - cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); - - onSuccess.release(); - onFailure.release(); -} -JNI_METHOD(void, TvChannelCluster, skipChannel)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject count) -{ - chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TvChannelCluster * cppCluster; - - chip::app::Clusters::TvChannel::Commands::SkipChannel::Type request; - - request.count = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(count)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - - cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); - - onSuccess.release(); - onFailure.release(); -} -JNI_METHOD(void, TvChannelCluster, subscribeClusterRevisionAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) -{ - chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TvChannelCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - using TypeInfo = chip::app::Clusters::TvChannel::Attributes::ClusterRevision::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPInt16uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} JNI_METHOD(jlong, TargetNavigatorCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; diff --git a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp index 124d180c2eaf01..4dde312ef8757d 100644 --- a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp @@ -2497,6 +2497,110 @@ JNI_METHOD(void, BridgedDeviceBasicCluster, readClusterRevisionAttribute) onFailure.release(); } +JNI_METHOD(void, ChannelCluster, readChannelListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::Channel::Attributes::ChannelList::TypeInfo; + std::unique_ptr onSuccess( + chip::Platform::New(callback, false), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::ChannelCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ChannelCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::Channel::Attributes::AttributeList::TypeInfo; + std::unique_ptr onSuccess( + chip::Platform::New(callback, false), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::ChannelCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ChannelCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::Channel::Attributes::ClusterRevision::TypeInfo; + std::unique_ptr onSuccess( + chip::Platform::New(callback, false), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::ChannelCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, ColorControlCluster, readCurrentHueAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -13292,110 +13396,6 @@ JNI_METHOD(void, SwitchCluster, readClusterRevisionAttribute)(JNIEnv * env, jobj onFailure.release(); } -JNI_METHOD(void, TvChannelCluster, readChannelListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TvChannel::Attributes::ChannelList::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), - chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::TvChannelCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TvChannelCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TvChannel::Attributes::AttributeList::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), - chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::TvChannelCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TvChannelCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TvChannel::Attributes::ClusterRevision::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - chip::Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::TvChannelCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - JNI_METHOD(void, TargetNavigatorCluster, readTargetNavigatorListAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index e652ffe7a7a645..014a651f428df9 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -287,6 +287,69 @@ void CHIPApplicationLauncherClusterStopAppResponseCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, status, data); } +CHIPChannelClusterChangeChannelResponseCallback::CHIPChannelClusterChangeChannelResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPChannelClusterChangeChannelResponseCallback::~CHIPChannelClusterChangeChannelResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPChannelClusterChangeChannelResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject channelMatch; + + channelMatch = nullptr; /* Struct - conversion from this type to Java is not properly implemented yet */ + jobject errorType; + + std::string errorTypeClassName = "java/lang/Integer"; + std::string errorTypeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + errorTypeClassName.c_str(), errorTypeCtorSignature.c_str(), dataResponse.errorType, errorType); + + env->CallVoidMethod(javaCallbackRef, javaMethod, channelMatch, errorType); +} CHIPContentLauncherClusterLaunchContentResponseCallback::CHIPContentLauncherClusterLaunchContentResponseCallback( jobject javaCallback) : Callback::Callback(CallbackFn, this) @@ -3210,70 +3273,6 @@ void CHIPScenesClusterViewSceneResponseCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, status, groupId, sceneId, transitionTime, sceneName, extensionFieldSets); } -CHIPTvChannelClusterChangeChannelResponseCallback::CHIPTvChannelClusterChangeChannelResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTvChannelClusterChangeChannelResponseCallback::~CHIPTvChannelClusterChangeChannelResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPTvChannelClusterChangeChannelResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::TvChannel::Commands::ChangeChannelResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject channelMatch; - - channelMatch = nullptr; /* Struct - conversion from this type to Java is not properly implemented yet */ - jobject errorType; - - std::string errorTypeClassName = "java/lang/Integer"; - std::string errorTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - errorTypeClassName.c_str(), errorTypeCtorSignature.c_str(), dataResponse.errorType, errorType); - - env->CallVoidMethod(javaCallbackRef, javaMethod, channelMatch, errorType); -} CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CHIPTargetNavigatorClusterNavigateTargetResponseCallback( jobject javaCallback) : Callback::Callback(CallbackFn, this) diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h index 7050765b040a4e..2d92f6dab72906 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h @@ -84,6 +84,21 @@ class CHIPApplicationLauncherClusterStopAppResponseCallback jobject javaCallbackRef; }; +class CHIPChannelClusterChangeChannelResponseCallback + : public Callback::Callback +{ +public: + CHIPChannelClusterChangeChannelResponseCallback(jobject javaCallback); + + ~CHIPChannelClusterChangeChannelResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + class CHIPContentLauncherClusterLaunchContentResponseCallback : public Callback::Callback { @@ -686,21 +701,6 @@ class CHIPScenesClusterViewSceneResponseCallback : public Callback::Callback -{ -public: - CHIPTvChannelClusterChangeChannelResponseCallback(jobject javaCallback); - - ~CHIPTvChannelClusterChangeChannelResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::TvChannel::Commands::ChangeChannelResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - class CHIPTargetNavigatorClusterNavigateTargetResponseCallback : public Callback::Callback { diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 2b4dab9fee21a6..fce016748eff28 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -2686,6 +2686,252 @@ void CHIPBridgedDeviceBasicAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } +CHIPChannelChannelListAttributeCallback::CHIPChannelChannelListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPChannelChannelListAttributeCallback::~CHIPChannelChannelListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPChannelChannelListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jclass attributeClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$ChannelCluster$ChannelListAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$ChannelCluster$ChannelListAttribute")); + chip::JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = + env->GetMethodID(attributeClass, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find ChannelListAttribute constructor")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + (void) entry; + bool majorNumberNull = false; + bool majorNumberHasValue = true; + + uint16_t majorNumberValue = entry.majorNumber; + + jobject majorNumber = nullptr; + if (!majorNumberNull && majorNumberHasValue) + { + jclass majorNumberEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", majorNumberEntryCls); + chip::JniClass majorNumberJniClass(majorNumberEntryCls); + jmethodID majorNumberEntryTypeCtor = env->GetMethodID(majorNumberEntryCls, "", "(I)V"); + majorNumber = env->NewObject(majorNumberEntryCls, majorNumberEntryTypeCtor, majorNumberValue); + } + + bool minorNumberNull = false; + bool minorNumberHasValue = true; + + uint16_t minorNumberValue = entry.minorNumber; + + jobject minorNumber = nullptr; + if (!minorNumberNull && minorNumberHasValue) + { + jclass minorNumberEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", minorNumberEntryCls); + chip::JniClass minorNumberJniClass(minorNumberEntryCls); + jmethodID minorNumberEntryTypeCtor = env->GetMethodID(minorNumberEntryCls, "", "(I)V"); + minorNumber = env->NewObject(minorNumberEntryCls, minorNumberEntryTypeCtor, minorNumberValue); + } + + bool nameNull = false; + bool nameHasValue = true; + + chip::CharSpan nameValue = entry.name; + + jstring name = nullptr; + chip::UtfString nameStr(env, nameValue); + if (!nameNull && nameHasValue) + { + name = jstring(nameStr.jniValue()); + } + + bool callSignNull = false; + bool callSignHasValue = true; + + chip::CharSpan callSignValue = entry.callSign; + + jstring callSign = nullptr; + chip::UtfString callSignStr(env, callSignValue); + if (!callSignNull && callSignHasValue) + { + callSign = jstring(callSignStr.jniValue()); + } + + bool affiliateCallSignNull = false; + bool affiliateCallSignHasValue = true; + + chip::CharSpan affiliateCallSignValue = entry.affiliateCallSign; + + jstring affiliateCallSign = nullptr; + chip::UtfString affiliateCallSignStr(env, affiliateCallSignValue); + if (!affiliateCallSignNull && affiliateCallSignHasValue) + { + affiliateCallSign = jstring(affiliateCallSignStr.jniValue()); + } + + jobject attributeObj = + env->NewObject(attributeClass, attributeCtor, majorNumber, minorNumber, name, callSign, affiliateCallSign); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create ChannelListAttribute object")); + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + } + VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding ChannelListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPChannelAttributeListAttributeCallback::CHIPChannelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPChannelAttributeListAttributeCallback::~CHIPChannelAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPChannelAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + CHIPColorControlAttributeListAttributeCallback::CHIPColorControlAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), @@ -9062,252 +9308,6 @@ void CHIPSwitchAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTvChannelChannelListAttributeCallback::CHIPTvChannelChannelListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTvChannelChannelListAttributeCallback::~CHIPTvChannelChannelListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTvChannelChannelListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$TvChannelCluster$ChannelListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$TvChannelCluster$ChannelListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find ChannelListAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool majorNumberNull = false; - bool majorNumberHasValue = true; - - uint16_t majorNumberValue = entry.majorNumber; - - jobject majorNumber = nullptr; - if (!majorNumberNull && majorNumberHasValue) - { - jclass majorNumberEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", majorNumberEntryCls); - chip::JniClass majorNumberJniClass(majorNumberEntryCls); - jmethodID majorNumberEntryTypeCtor = env->GetMethodID(majorNumberEntryCls, "", "(I)V"); - majorNumber = env->NewObject(majorNumberEntryCls, majorNumberEntryTypeCtor, majorNumberValue); - } - - bool minorNumberNull = false; - bool minorNumberHasValue = true; - - uint16_t minorNumberValue = entry.minorNumber; - - jobject minorNumber = nullptr; - if (!minorNumberNull && minorNumberHasValue) - { - jclass minorNumberEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", minorNumberEntryCls); - chip::JniClass minorNumberJniClass(minorNumberEntryCls); - jmethodID minorNumberEntryTypeCtor = env->GetMethodID(minorNumberEntryCls, "", "(I)V"); - minorNumber = env->NewObject(minorNumberEntryCls, minorNumberEntryTypeCtor, minorNumberValue); - } - - bool nameNull = false; - bool nameHasValue = true; - - chip::CharSpan nameValue = entry.name; - - jstring name = nullptr; - chip::UtfString nameStr(env, nameValue); - if (!nameNull && nameHasValue) - { - name = jstring(nameStr.jniValue()); - } - - bool callSignNull = false; - bool callSignHasValue = true; - - chip::CharSpan callSignValue = entry.callSign; - - jstring callSign = nullptr; - chip::UtfString callSignStr(env, callSignValue); - if (!callSignNull && callSignHasValue) - { - callSign = jstring(callSignStr.jniValue()); - } - - bool affiliateCallSignNull = false; - bool affiliateCallSignHasValue = true; - - chip::CharSpan affiliateCallSignValue = entry.affiliateCallSign; - - jstring affiliateCallSign = nullptr; - chip::UtfString affiliateCallSignStr(env, affiliateCallSignValue); - if (!affiliateCallSignNull && affiliateCallSignHasValue) - { - affiliateCallSign = jstring(affiliateCallSignStr.jniValue()); - } - - jobject attributeObj = - env->NewObject(attributeClass, attributeCtor, majorNumber, minorNumber, name, callSign, affiliateCallSign); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create ChannelListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); - } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ChannelListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTvChannelAttributeListAttributeCallback::CHIPTvChannelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPTvChannelAttributeListAttributeCallback::~CHIPTvChannelAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPTvChannelAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); - } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - CHIPTargetNavigatorTargetNavigatorListAttributeCallback::CHIPTargetNavigatorTargetNavigatorListAttributeCallback( jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index 8e76b695508641..c937177539498e 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -1002,6 +1002,67 @@ class CHIPBridgedDeviceBasicAttributeListAttributeCallback bool keepAlive; }; +class CHIPChannelChannelListAttributeCallback : public chip::Callback::Callback +{ +public: + CHIPChannelChannelListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPChannelChannelListAttributeCallback(); + + static void maybeDestroy(CHIPChannelChannelListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void + CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPChannelAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPChannelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPChannelAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPChannelAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPColorControlAttributeListAttributeCallback : public chip::Callback::Callback { @@ -3099,68 +3160,6 @@ class CHIPSwitchAttributeListAttributeCallback bool keepAlive; }; -class CHIPTvChannelChannelListAttributeCallback - : public chip::Callback::Callback -{ -public: - CHIPTvChannelChannelListAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPTvChannelChannelListAttributeCallback(); - - static void maybeDestroy(CHIPTvChannelChannelListAttributeCallback * callback) - { - if (!callback->keepAlive) - { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list); - static void OnSubscriptionEstablished(void * context) - { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( - reinterpret_cast(context)->javaCallbackRef); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; - -class CHIPTvChannelAttributeListAttributeCallback - : public chip::Callback::Callback -{ -public: - CHIPTvChannelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPTvChannelAttributeListAttributeCallback(); - - static void maybeDestroy(CHIPTvChannelAttributeListAttributeCallback * callback) - { - if (!callback->keepAlive) - { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); - static void OnSubscriptionEstablished(void * context) - { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( - reinterpret_cast(context)->javaCallbackRef); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; - class CHIPTargetNavigatorTargetNavigatorListAttributeCallback : public chip::Callback::Callback { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 4101050502be0a..aac3ab56f1b7d0 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -1889,6 +1889,144 @@ private native void subscribeClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); } + public static class ChannelCluster extends BaseChipCluster { + public ChannelCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + public static long clusterId() { + return Long.parseUnsignedLong("1284"); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void changeChannel(ChangeChannelResponseCallback callback, String match) { + changeChannel(chipClusterPtr, callback, match); + } + + public void changeChannelByNumber( + DefaultClusterCallback callback, Integer majorNumber, Integer minorNumber) { + changeChannelByNumber(chipClusterPtr, callback, majorNumber, minorNumber); + } + + public void skipChannel(DefaultClusterCallback callback, Integer count) { + skipChannel(chipClusterPtr, callback, count); + } + + private native void changeChannel( + long chipClusterPtr, ChangeChannelResponseCallback Callback, String match); + + private native void changeChannelByNumber( + long chipClusterPtr, + DefaultClusterCallback Callback, + Integer majorNumber, + Integer minorNumber); + + private native void skipChannel( + long chipClusterPtr, DefaultClusterCallback Callback, Integer count); + + public interface ChangeChannelResponseCallback { + void onSuccess( // channelMatch: Struct ChannelInfo + // Conversion from this type to Java is not properly implemented yet + Integer errorType); + + void onError(Exception error); + } + + public static class ChannelListAttribute { + public Integer majorNumber; + public Integer minorNumber; + public String name; + public String callSign; + public String affiliateCallSign; + + public ChannelListAttribute( + Integer majorNumber, + Integer minorNumber, + String name, + String callSign, + String affiliateCallSign) { + this.majorNumber = majorNumber; + this.minorNumber = minorNumber; + this.name = name; + this.callSign = callSign; + this.affiliateCallSign = affiliateCallSign; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(""); + output.append("int majorNumber: "); + output.append(this.majorNumber); + output.append("\n"); + + output.append("int minorNumber: "); + output.append(this.minorNumber); + output.append("\n"); + + output.append("String name: "); + output.append(this.name); + output.append("\n"); + + output.append("String callSign: "); + output.append(this.callSign); + output.append("\n"); + + output.append("String affiliateCallSign: "); + output.append(this.affiliateCallSign); + output.append("\n"); + + return output.toString(); + } + } + + public interface ChannelListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public void readChannelListAttribute(ChannelListAttributeCallback callback) { + readChannelListAttribute(chipClusterPtr, callback); + } + + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readChannelListAttribute( + long chipClusterPtr, ChannelListAttributeCallback callback); + + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + + private native void readClusterRevisionAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeClusterRevisionAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + } + public static class ColorControlCluster extends BaseChipCluster { public ColorControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -9155,144 +9293,6 @@ private native void subscribeClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); } - public static class TvChannelCluster extends BaseChipCluster { - public TvChannelCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId); - } - - public static long clusterId() { - return Long.parseUnsignedLong("1284"); - } - - @Override - public native long initWithDevice(long devicePtr, int endpointId); - - public void changeChannel(ChangeChannelResponseCallback callback, String match) { - changeChannel(chipClusterPtr, callback, match); - } - - public void changeChannelByNumber( - DefaultClusterCallback callback, Integer majorNumber, Integer minorNumber) { - changeChannelByNumber(chipClusterPtr, callback, majorNumber, minorNumber); - } - - public void skipChannel(DefaultClusterCallback callback, Integer count) { - skipChannel(chipClusterPtr, callback, count); - } - - private native void changeChannel( - long chipClusterPtr, ChangeChannelResponseCallback Callback, String match); - - private native void changeChannelByNumber( - long chipClusterPtr, - DefaultClusterCallback Callback, - Integer majorNumber, - Integer minorNumber); - - private native void skipChannel( - long chipClusterPtr, DefaultClusterCallback Callback, Integer count); - - public interface ChangeChannelResponseCallback { - void onSuccess( // channelMatch: Struct TvChannelInfo - // Conversion from this type to Java is not properly implemented yet - Integer errorType); - - void onError(Exception error); - } - - public static class ChannelListAttribute { - public Integer majorNumber; - public Integer minorNumber; - public String name; - public String callSign; - public String affiliateCallSign; - - public ChannelListAttribute( - Integer majorNumber, - Integer minorNumber, - String name, - String callSign, - String affiliateCallSign) { - this.majorNumber = majorNumber; - this.minorNumber = minorNumber; - this.name = name; - this.callSign = callSign; - this.affiliateCallSign = affiliateCallSign; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("int majorNumber: "); - output.append(this.majorNumber); - output.append("\n"); - - output.append("int minorNumber: "); - output.append(this.minorNumber); - output.append("\n"); - - output.append("String name: "); - output.append(this.name); - output.append("\n"); - - output.append("String callSign: "); - output.append(this.callSign); - output.append("\n"); - - output.append("String affiliateCallSign: "); - output.append(this.affiliateCallSign); - output.append("\n"); - - return output.toString(); - } - } - - public interface ChannelListAttributeCallback { - void onSuccess(List valueList); - - void onError(Exception ex); - - default void onSubscriptionEstablished() {} - } - - public interface AttributeListAttributeCallback { - void onSuccess(List valueList); - - void onError(Exception ex); - - default void onSubscriptionEstablished() {} - } - - public void readChannelListAttribute(ChannelListAttributeCallback callback) { - readChannelListAttribute(chipClusterPtr, callback); - } - - public void readAttributeListAttribute(AttributeListAttributeCallback callback) { - readAttributeListAttribute(chipClusterPtr, callback); - } - - public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { - readClusterRevisionAttribute(chipClusterPtr, callback); - } - - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - private native void readChannelListAttribute( - long chipClusterPtr, ChannelListAttributeCallback callback); - - private native void readAttributeListAttribute( - long chipClusterPtr, AttributeListAttributeCallback callback); - - private native void readClusterRevisionAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); - - private native void subscribeClusterRevisionAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); - } - public static class TargetNavigatorCluster extends BaseChipCluster { public TargetNavigatorCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index ab81448263a98d..4e033d18b85ff3 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -810,6 +810,86 @@ public void onError(Exception ex) { } } + public static class DelegatedChangeChannelResponseCallback + implements ChipClusters.ChannelCluster.ChangeChannelResponseCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess( // channelMatch: Struct ChannelInfo + // Conversion from this type to Java is not properly implemented yet + Integer errorType) { + Map responseValues = new LinkedHashMap<>(); + // channelMatch: Struct ChannelInfo + // Conversion from this type to Java is not properly implemented yet + CommandResponseInfo errorTypeResponseValue = new CommandResponseInfo("errorType", "int"); + responseValues.put(errorTypeResponseValue, errorType); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedChannelClusterChannelListAttributeCallback + implements ChipClusters.ChannelCluster.ChannelListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = + new CommandResponseInfo( + "valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedChannelClusterAttributeListAttributeCallback + implements ChipClusters.ChannelCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedColorControlClusterAttributeListAttributeCallback implements ChipClusters.ColorControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { @@ -3422,86 +3502,6 @@ public void onError(Exception ex) { } } - public static class DelegatedChangeChannelResponseCallback - implements ChipClusters.TvChannelCluster.ChangeChannelResponseCallback, - DelegatedClusterCallback { - private ClusterCommandCallback callback; - - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess( // channelMatch: Struct TvChannelInfo - // Conversion from this type to Java is not properly implemented yet - Integer errorType) { - Map responseValues = new LinkedHashMap<>(); - // channelMatch: Struct TvChannelInfo - // Conversion from this type to Java is not properly implemented yet - CommandResponseInfo errorTypeResponseValue = new CommandResponseInfo("errorType", "int"); - responseValues.put(errorTypeResponseValue, errorType); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception error) { - callback.onFailure(error); - } - } - - public static class DelegatedTvChannelClusterChannelListAttributeCallback - implements ChipClusters.TvChannelCluster.ChannelListAttributeCallback, - DelegatedClusterCallback { - private ClusterCommandCallback callback; - - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = - new CommandResponseInfo( - "valueList", "List"); - - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedTvChannelClusterAttributeListAttributeCallback - implements ChipClusters.TvChannelCluster.AttributeListAttributeCallback, - DelegatedClusterCallback { - private ClusterCommandCallback callback; - - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - public static class DelegatedNavigateTargetResponseCallback implements ChipClusters.TargetNavigatorCluster.NavigateTargetResponseCallback, DelegatedClusterCallback { @@ -4440,6 +4440,10 @@ public Map initializeClusterMap() { (ptr, endpointId) -> new ChipClusters.BridgedDeviceBasicCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("bridgedDeviceBasic", bridgedDeviceBasicClusterInfo); + ClusterInfo channelClusterInfo = + new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.ChannelCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("channel", channelClusterInfo); ClusterInfo colorControlClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.ColorControlCluster(ptr, endpointId), @@ -4620,11 +4624,6 @@ public Map initializeClusterMap() { new ClusterInfo( (ptr, endpointId) -> new ChipClusters.SwitchCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("switch", switchClusterInfo); - ClusterInfo tvChannelClusterInfo = - new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.TvChannelCluster(ptr, endpointId), - new HashMap<>()); - clusterMap.put("tvChannel", tvChannelClusterInfo); ClusterInfo targetNavigatorClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.TargetNavigatorCluster(ptr, endpointId), @@ -4697,6 +4696,7 @@ public void combineCommand( destination.get("booleanState").combineCommands(source.get("booleanState")); destination.get("bridgedActions").combineCommands(source.get("bridgedActions")); destination.get("bridgedDeviceBasic").combineCommands(source.get("bridgedDeviceBasic")); + destination.get("channel").combineCommands(source.get("channel")); destination.get("colorControl").combineCommands(source.get("colorControl")); destination.get("contentLauncher").combineCommands(source.get("contentLauncher")); destination.get("descriptor").combineCommands(source.get("descriptor")); @@ -4747,7 +4747,6 @@ public void combineCommand( destination.get("scenes").combineCommands(source.get("scenes")); destination.get("softwareDiagnostics").combineCommands(source.get("softwareDiagnostics")); destination.get("switch").combineCommands(source.get("switch")); - destination.get("tvChannel").combineCommands(source.get("tvChannel")); destination.get("targetNavigator").combineCommands(source.get("targetNavigator")); destination.get("temperatureMeasurement").combineCommands(source.get("temperatureMeasurement")); destination.get("testCluster").combineCommands(source.get("testCluster")); @@ -5555,6 +5554,69 @@ public Map> getCommandMap() { Map bridgedDeviceBasicClusterInteractionInfoMap = new LinkedHashMap<>(); commandMap.put("bridgedDeviceBasic", bridgedDeviceBasicClusterInteractionInfoMap); + Map channelClusterInteractionInfoMap = new LinkedHashMap<>(); + Map channelchangeChannelCommandParams = + new LinkedHashMap(); + CommandParameterInfo channelchangeChannelmatchCommandParameterInfo = + new CommandParameterInfo("match", String.class); + channelchangeChannelCommandParams.put("match", channelchangeChannelmatchCommandParameterInfo); + + // Populate commands + InteractionInfo channelchangeChannelInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ChannelCluster) cluster) + .changeChannel( + (ChipClusters.ChannelCluster.ChangeChannelResponseCallback) callback, + (String) commandArguments.get("match")); + }, + () -> new DelegatedChangeChannelResponseCallback(), + channelchangeChannelCommandParams); + channelClusterInteractionInfoMap.put("changeChannel", channelchangeChannelInteractionInfo); + Map channelchangeChannelByNumberCommandParams = + new LinkedHashMap(); + CommandParameterInfo channelchangeChannelByNumbermajorNumberCommandParameterInfo = + new CommandParameterInfo("majorNumber", int.class); + channelchangeChannelByNumberCommandParams.put( + "majorNumber", channelchangeChannelByNumbermajorNumberCommandParameterInfo); + + CommandParameterInfo channelchangeChannelByNumberminorNumberCommandParameterInfo = + new CommandParameterInfo("minorNumber", int.class); + channelchangeChannelByNumberCommandParams.put( + "minorNumber", channelchangeChannelByNumberminorNumberCommandParameterInfo); + + // Populate commands + InteractionInfo channelchangeChannelByNumberInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ChannelCluster) cluster) + .changeChannelByNumber( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("majorNumber"), + (Integer) commandArguments.get("minorNumber")); + }, + () -> new DelegatedDefaultClusterCallback(), + channelchangeChannelByNumberCommandParams); + channelClusterInteractionInfoMap.put( + "changeChannelByNumber", channelchangeChannelByNumberInteractionInfo); + Map channelskipChannelCommandParams = + new LinkedHashMap(); + CommandParameterInfo channelskipChannelcountCommandParameterInfo = + new CommandParameterInfo("count", int.class); + channelskipChannelCommandParams.put("count", channelskipChannelcountCommandParameterInfo); + + // Populate commands + InteractionInfo channelskipChannelInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ChannelCluster) cluster) + .skipChannel( + (DefaultClusterCallback) callback, (Integer) commandArguments.get("count")); + }, + () -> new DelegatedDefaultClusterCallback(), + channelskipChannelCommandParams); + channelClusterInteractionInfoMap.put("skipChannel", channelskipChannelInteractionInfo); + commandMap.put("channel", channelClusterInteractionInfoMap); Map colorControlClusterInteractionInfoMap = new LinkedHashMap<>(); Map colorControlcolorLoopSetCommandParams = new LinkedHashMap(); @@ -8454,70 +8516,6 @@ public Map> getCommandMap() { commandMap.put("softwareDiagnostics", softwareDiagnosticsClusterInteractionInfoMap); Map switchClusterInteractionInfoMap = new LinkedHashMap<>(); commandMap.put("switch", switchClusterInteractionInfoMap); - Map tvChannelClusterInteractionInfoMap = new LinkedHashMap<>(); - Map tvChannelchangeChannelCommandParams = - new LinkedHashMap(); - CommandParameterInfo tvChannelchangeChannelmatchCommandParameterInfo = - new CommandParameterInfo("match", String.class); - tvChannelchangeChannelCommandParams.put( - "match", tvChannelchangeChannelmatchCommandParameterInfo); - - // Populate commands - InteractionInfo tvChannelchangeChannelInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.TvChannelCluster) cluster) - .changeChannel( - (ChipClusters.TvChannelCluster.ChangeChannelResponseCallback) callback, - (String) commandArguments.get("match")); - }, - () -> new DelegatedChangeChannelResponseCallback(), - tvChannelchangeChannelCommandParams); - tvChannelClusterInteractionInfoMap.put("changeChannel", tvChannelchangeChannelInteractionInfo); - Map tvChannelchangeChannelByNumberCommandParams = - new LinkedHashMap(); - CommandParameterInfo tvChannelchangeChannelByNumbermajorNumberCommandParameterInfo = - new CommandParameterInfo("majorNumber", int.class); - tvChannelchangeChannelByNumberCommandParams.put( - "majorNumber", tvChannelchangeChannelByNumbermajorNumberCommandParameterInfo); - - CommandParameterInfo tvChannelchangeChannelByNumberminorNumberCommandParameterInfo = - new CommandParameterInfo("minorNumber", int.class); - tvChannelchangeChannelByNumberCommandParams.put( - "minorNumber", tvChannelchangeChannelByNumberminorNumberCommandParameterInfo); - - // Populate commands - InteractionInfo tvChannelchangeChannelByNumberInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.TvChannelCluster) cluster) - .changeChannelByNumber( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("majorNumber"), - (Integer) commandArguments.get("minorNumber")); - }, - () -> new DelegatedDefaultClusterCallback(), - tvChannelchangeChannelByNumberCommandParams); - tvChannelClusterInteractionInfoMap.put( - "changeChannelByNumber", tvChannelchangeChannelByNumberInteractionInfo); - Map tvChannelskipChannelCommandParams = - new LinkedHashMap(); - CommandParameterInfo tvChannelskipChannelcountCommandParameterInfo = - new CommandParameterInfo("count", int.class); - tvChannelskipChannelCommandParams.put("count", tvChannelskipChannelcountCommandParameterInfo); - - // Populate commands - InteractionInfo tvChannelskipChannelInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.TvChannelCluster) cluster) - .skipChannel( - (DefaultClusterCallback) callback, (Integer) commandArguments.get("count")); - }, - () -> new DelegatedDefaultClusterCallback(), - tvChannelskipChannelCommandParams); - tvChannelClusterInteractionInfoMap.put("skipChannel", tvChannelskipChannelInteractionInfo); - commandMap.put("tvChannel", tvChannelClusterInteractionInfoMap); Map targetNavigatorClusterInteractionInfoMap = new LinkedHashMap<>(); Map targetNavigatornavigateTargetCommandParams = new LinkedHashMap(); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index 062c4e11dd679e..680572f1f415a0 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -984,6 +984,46 @@ public Map> getReadAttributeMap() { "readClusterRevisionAttribute", readBridgedDeviceBasicClusterRevisionAttributeInteractionInfo); readAttributeMap.put("bridgedDeviceBasic", readBridgedDeviceBasicInteractionInfo); + Map readChannelInteractionInfo = new LinkedHashMap<>(); + Map readChannelChannelListCommandParams = + new LinkedHashMap(); + InteractionInfo readChannelChannelListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ChannelCluster) cluster) + .readChannelListAttribute( + (ChipClusters.ChannelCluster.ChannelListAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedChannelClusterChannelListAttributeCallback(), + readChannelChannelListCommandParams); + readChannelInteractionInfo.put( + "readChannelListAttribute", readChannelChannelListAttributeInteractionInfo); + Map readChannelAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readChannelAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ChannelCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.ChannelCluster.AttributeListAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedChannelClusterAttributeListAttributeCallback(), + readChannelAttributeListCommandParams); + readChannelInteractionInfo.put( + "readAttributeListAttribute", readChannelAttributeListAttributeInteractionInfo); + Map readChannelClusterRevisionCommandParams = + new LinkedHashMap(); + InteractionInfo readChannelClusterRevisionAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ChannelCluster) cluster) + .readClusterRevisionAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readChannelClusterRevisionCommandParams); + readChannelInteractionInfo.put( + "readClusterRevisionAttribute", readChannelClusterRevisionAttributeInteractionInfo); + readAttributeMap.put("channel", readChannelInteractionInfo); Map readColorControlInteractionInfo = new LinkedHashMap<>(); Map readColorControlCurrentHueCommandParams = new LinkedHashMap(); @@ -5077,46 +5117,6 @@ public Map> getReadAttributeMap() { readSwitchInteractionInfo.put( "readClusterRevisionAttribute", readSwitchClusterRevisionAttributeInteractionInfo); readAttributeMap.put("switch", readSwitchInteractionInfo); - Map readTvChannelInteractionInfo = new LinkedHashMap<>(); - Map readTvChannelChannelListCommandParams = - new LinkedHashMap(); - InteractionInfo readTvChannelChannelListAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.TvChannelCluster) cluster) - .readChannelListAttribute( - (ChipClusters.TvChannelCluster.ChannelListAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedTvChannelClusterChannelListAttributeCallback(), - readTvChannelChannelListCommandParams); - readTvChannelInteractionInfo.put( - "readChannelListAttribute", readTvChannelChannelListAttributeInteractionInfo); - Map readTvChannelAttributeListCommandParams = - new LinkedHashMap(); - InteractionInfo readTvChannelAttributeListAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.TvChannelCluster) cluster) - .readAttributeListAttribute( - (ChipClusters.TvChannelCluster.AttributeListAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedTvChannelClusterAttributeListAttributeCallback(), - readTvChannelAttributeListCommandParams); - readTvChannelInteractionInfo.put( - "readAttributeListAttribute", readTvChannelAttributeListAttributeInteractionInfo); - Map readTvChannelClusterRevisionCommandParams = - new LinkedHashMap(); - InteractionInfo readTvChannelClusterRevisionAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.TvChannelCluster) cluster) - .readClusterRevisionAttribute((ChipClusters.IntegerAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readTvChannelClusterRevisionCommandParams); - readTvChannelInteractionInfo.put( - "readClusterRevisionAttribute", readTvChannelClusterRevisionAttributeInteractionInfo); - readAttributeMap.put("tvChannel", readTvChannelInteractionInfo); Map readTargetNavigatorInteractionInfo = new LinkedHashMap<>(); Map readTargetNavigatorTargetNavigatorListCommandParams = new LinkedHashMap(); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java index c5e421a2fddfc9..2036490065239e 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java @@ -140,6 +140,8 @@ public Map> getWriteAttributeMap() { writeAttributeMap.put("bridgedActions", writeBridgedActionsInteractionInfo); Map writeBridgedDeviceBasicInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("bridgedDeviceBasic", writeBridgedDeviceBasicInteractionInfo); + Map writeChannelInteractionInfo = new LinkedHashMap<>(); + writeAttributeMap.put("channel", writeChannelInteractionInfo); Map writeColorControlInteractionInfo = new LinkedHashMap<>(); Map writeColorControlColorControlOptionsCommandParams = new LinkedHashMap(); @@ -933,8 +935,6 @@ public Map> getWriteAttributeMap() { writeAttributeMap.put("softwareDiagnostics", writeSoftwareDiagnosticsInteractionInfo); Map writeSwitchInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("switch", writeSwitchInteractionInfo); - Map writeTvChannelInteractionInfo = new LinkedHashMap<>(); - writeAttributeMap.put("tvChannel", writeTvChannelInteractionInfo); Map writeTargetNavigatorInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("targetNavigator", writeTargetNavigatorInteractionInfo); Map writeTemperatureMeasurementInteractionInfo = new LinkedHashMap<>(); diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 88d70aa5196a49..87514f2c796b2d 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -781,6 +781,53 @@ class ChipClusters: }, }, } + _CHANNEL_CLUSTER_INFO = { + "clusterName": "Channel", + "clusterId": 0x00000504, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "ChangeChannel", + "args": { + "match": "str", + }, + }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "ChangeChannelByNumber", + "args": { + "majorNumber": "int", + "minorNumber": "int", + }, + }, + 0x00000002: { + "commandId": 0x00000002, + "commandName": "SkipChannel", + "args": { + "count": "int", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "ChannelList", + "attributeId": 0x00000000, + "type": "", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } _COLOR_CONTROL_CLUSTER_INFO = { "clusterName": "ColorControl", "clusterId": 0x00000300, @@ -3727,53 +3774,6 @@ class ChipClusters: }, }, } - _TV_CHANNEL_CLUSTER_INFO = { - "clusterName": "TvChannel", - "clusterId": 0x00000504, - "commands": { - 0x00000000: { - "commandId": 0x00000000, - "commandName": "ChangeChannel", - "args": { - "match": "str", - }, - }, - 0x00000001: { - "commandId": 0x00000001, - "commandName": "ChangeChannelByNumber", - "args": { - "majorNumber": "int", - "minorNumber": "int", - }, - }, - 0x00000002: { - "commandId": 0x00000002, - "commandName": "SkipChannel", - "args": { - "count": "int", - }, - }, - }, - "attributes": { - 0x00000000: { - "attributeName": "ChannelList", - "attributeId": 0x00000000, - "type": "", - "reportable": True, - }, - 0x0000FFFB: { - "attributeName": "AttributeList", - "attributeId": 0x0000FFFB, - "type": "int", - }, - 0x0000FFFD: { - "attributeName": "ClusterRevision", - "attributeId": 0x0000FFFD, - "type": "int", - "reportable": True, - }, - }, - } _TARGET_NAVIGATOR_CLUSTER_INFO = { "clusterName": "TargetNavigator", "clusterId": 0x00000505, @@ -5537,6 +5537,7 @@ class ChipClusters: 0x00000045: _BOOLEAN_STATE_CLUSTER_INFO, 0x00000025: _BRIDGED_ACTIONS_CLUSTER_INFO, 0x00000039: _BRIDGED_DEVICE_BASIC_CLUSTER_INFO, + 0x00000504: _CHANNEL_CLUSTER_INFO, 0x00000300: _COLOR_CONTROL_CLUSTER_INFO, 0x0000050A: _CONTENT_LAUNCHER_CLUSTER_INFO, 0x0000001D: _DESCRIPTOR_CLUSTER_INFO, @@ -5573,7 +5574,6 @@ class ChipClusters: 0x00000005: _SCENES_CLUSTER_INFO, 0x00000034: _SOFTWARE_DIAGNOSTICS_CLUSTER_INFO, 0x0000003B: _SWITCH_CLUSTER_INFO, - 0x00000504: _TV_CHANNEL_CLUSTER_INFO, 0x00000505: _TARGET_NAVIGATOR_CLUSTER_INFO, 0x00000402: _TEMPERATURE_MEASUREMENT_CLUSTER_INFO, 0x0000050F: _TEST_CLUSTER_CLUSTER_INFO, @@ -5600,6 +5600,7 @@ class ChipClusters: "BooleanState": _BOOLEAN_STATE_CLUSTER_INFO, "BridgedActions": _BRIDGED_ACTIONS_CLUSTER_INFO, "BridgedDeviceBasic": _BRIDGED_DEVICE_BASIC_CLUSTER_INFO, + "Channel": _CHANNEL_CLUSTER_INFO, "ColorControl": _COLOR_CONTROL_CLUSTER_INFO, "ContentLauncher": _CONTENT_LAUNCHER_CLUSTER_INFO, "Descriptor": _DESCRIPTOR_CLUSTER_INFO, @@ -5636,7 +5637,6 @@ class ChipClusters: "Scenes": _SCENES_CLUSTER_INFO, "SoftwareDiagnostics": _SOFTWARE_DIAGNOSTICS_CLUSTER_INFO, "Switch": _SWITCH_CLUSTER_INFO, - "TvChannel": _TV_CHANNEL_CLUSTER_INFO, "TargetNavigator": _TARGET_NAVIGATOR_CLUSTER_INFO, "TemperatureMeasurement": _TEMPERATURE_MEASUREMENT_CLUSTER_INFO, "TestCluster": _TEST_CLUSTER_CLUSTER_INFO, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index afc2666be6162a..e8adf036c8966f 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -27224,40 +27224,40 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class TvChannel(Cluster): +class Channel(Cluster): id: typing.ClassVar[int] = 0x0504 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="channelList", Tag=0x00000000, Type=typing.List[TvChannel.Structs.TvChannelInfo]), - ClusterObjectFieldDescriptor(Label="channelLineup", Tag=0x00000001, Type=TvChannel.Structs.TvChannelLineupInfo), - ClusterObjectFieldDescriptor(Label="currentChannel", Tag=0x00000002, Type=TvChannel.Structs.TvChannelInfo), + ClusterObjectFieldDescriptor(Label="channelList", Tag=0x00000000, Type=typing.List[Channel.Structs.ChannelInfo]), + ClusterObjectFieldDescriptor(Label="channelLineup", Tag=0x00000001, Type=Channel.Structs.ChannelLineupInfo), + ClusterObjectFieldDescriptor(Label="currentChannel", Tag=0x00000002, Type=Channel.Structs.ChannelInfo), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - channelList: 'typing.List[TvChannel.Structs.TvChannelInfo]' = None - channelLineup: 'TvChannel.Structs.TvChannelLineupInfo' = None - currentChannel: 'TvChannel.Structs.TvChannelInfo' = None + channelList: 'typing.List[Channel.Structs.ChannelInfo]' = None + channelLineup: 'Channel.Structs.ChannelLineupInfo' = None + currentChannel: 'Channel.Structs.ChannelInfo' = None attributeList: 'typing.List[uint]' = None featureMap: 'typing.Optional[uint]' = None clusterRevision: 'uint' = None class Enums: - class TvChannelErrorType(IntEnum): + class ChannelErrorType(IntEnum): kMultipleMatches = 0x00 kNoMatches = 0x01 - class TvChannelLineupInfoType(IntEnum): + class ChannelLineupInfoType(IntEnum): kMso = 0x00 class Structs: @dataclass - class TvChannelInfo(ClusterObject): + class ChannelInfo(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( @@ -27276,7 +27276,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: affiliateCallSign: 'str' = "" @dataclass - class TvChannelLineupInfo(ClusterObject): + class ChannelLineupInfo(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( @@ -27284,13 +27284,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="operatorName", Tag=1, Type=str), ClusterObjectFieldDescriptor(Label="lineupName", Tag=2, Type=str), ClusterObjectFieldDescriptor(Label="postalCode", Tag=3, Type=str), - ClusterObjectFieldDescriptor(Label="lineupInfoType", Tag=4, Type=TvChannel.Enums.TvChannelLineupInfoType), + ClusterObjectFieldDescriptor(Label="lineupInfoType", Tag=4, Type=Channel.Enums.ChannelLineupInfoType), ]) operatorName: 'str' = "" lineupName: 'str' = "" postalCode: 'str' = "" - lineupInfoType: 'TvChannel.Enums.TvChannelLineupInfoType' = 0 + lineupInfoType: 'Channel.Enums.ChannelLineupInfoType' = 0 @@ -27320,12 +27320,12 @@ class ChangeChannelResponse(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="channelMatch", Tag=0, Type=TvChannel.Structs.TvChannelInfo), - ClusterObjectFieldDescriptor(Label="errorType", Tag=1, Type=TvChannel.Enums.TvChannelErrorType), + ClusterObjectFieldDescriptor(Label="channelMatch", Tag=0, Type=Channel.Structs.ChannelInfo), + ClusterObjectFieldDescriptor(Label="errorType", Tag=1, Type=Channel.Enums.ChannelErrorType), ]) - channelMatch: 'TvChannel.Structs.TvChannelInfo' = field(default_factory=lambda: TvChannel.Structs.TvChannelInfo()) - errorType: 'TvChannel.Enums.TvChannelErrorType' = 0 + channelMatch: 'Channel.Structs.ChannelInfo' = field(default_factory=lambda: Channel.Structs.ChannelInfo()) + errorType: 'Channel.Enums.ChannelErrorType' = 0 @dataclass class ChangeChannelByNumber(ClusterCommand): @@ -27373,9 +27373,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[TvChannel.Structs.TvChannelInfo]) + return ClusterObjectFieldDescriptor(Type=typing.List[Channel.Structs.ChannelInfo]) - value: 'typing.List[TvChannel.Structs.TvChannelInfo]' = field(default_factory=lambda: []) + value: 'typing.List[Channel.Structs.ChannelInfo]' = field(default_factory=lambda: []) @dataclass class ChannelLineup(ClusterAttributeDescriptor): @@ -27389,9 +27389,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=TvChannel.Structs.TvChannelLineupInfo) + return ClusterObjectFieldDescriptor(Type=Channel.Structs.ChannelLineupInfo) - value: 'TvChannel.Structs.TvChannelLineupInfo' = field(default_factory=lambda: TvChannel.Structs.TvChannelLineupInfo()) + value: 'Channel.Structs.ChannelLineupInfo' = field(default_factory=lambda: Channel.Structs.ChannelLineupInfo()) @dataclass class CurrentChannel(ClusterAttributeDescriptor): @@ -27405,9 +27405,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=TvChannel.Structs.TvChannelInfo) + return ClusterObjectFieldDescriptor(Type=Channel.Structs.ChannelInfo) - value: 'TvChannel.Structs.TvChannelInfo' = field(default_factory=lambda: TvChannel.Structs.TvChannelInfo()) + value: 'Channel.Structs.ChannelInfo' = field(default_factory=lambda: Channel.Structs.ChannelInfo()) @dataclass class AttributeList(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index 460945b34975b9..7afd479471ae14 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -1315,6 +1315,89 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } break; } + case Clusters::Channel::Id: { + using namespace Clusters::Channel; + switch (aPath.mAttributeId) { + case Attributes::ChannelList::Id: { + using TypeInfo = Attributes::ChannelList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPChannelClusterChannelInfo * newElement_0; + newElement_0 = [CHIPChannelClusterChannelInfo new]; + newElement_0.majorNumber = [NSNumber numberWithUnsignedShort:entry_0.majorNumber]; + newElement_0.minorNumber = [NSNumber numberWithUnsignedShort:entry_0.minorNumber]; + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; + newElement_0.callSign = [[NSString alloc] initWithBytes:entry_0.callSign.data() + length:entry_0.callSign.size() + encoding:NSUTF8StringEncoding]; + newElement_0.affiliateCallSign = [[NSString alloc] initWithBytes:entry_0.affiliateCallSign.data() + length:entry_0.affiliateCallSign.size() + encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; + } + { // Scope for the error so we will know what it's named + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + } + value = array_0; + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + { // Scope for the error so we will know what it's named + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + } + value = array_0; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } case Clusters::ColorControl::Id: { using namespace Clusters::ColorControl; switch (aPath.mAttributeId) { @@ -5924,89 +6007,6 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } break; } - case Clusters::TvChannel::Id: { - using namespace Clusters::TvChannel; - switch (aPath.mAttributeId) { - case Attributes::ChannelList::Id: { - using TypeInfo = Attributes::ChannelList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - CHIPTvChannelClusterTvChannelInfo * newElement_0; - newElement_0 = [CHIPTvChannelClusterTvChannelInfo new]; - newElement_0.majorNumber = [NSNumber numberWithUnsignedShort:entry_0.majorNumber]; - newElement_0.minorNumber = [NSNumber numberWithUnsignedShort:entry_0.minorNumber]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; - newElement_0.callSign = [[NSString alloc] initWithBytes:entry_0.callSign.data() - length:entry_0.callSign.size() - encoding:NSUTF8StringEncoding]; - newElement_0.affiliateCallSign = [[NSString alloc] initWithBytes:entry_0.affiliateCallSign.data() - length:entry_0.affiliateCallSign.size() - encoding:NSUTF8StringEncoding]; - [array_0 addObject:newElement_0]; - } - { // Scope for the error so we will know what it's named - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - } - value = array_0; - return value; - } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - { // Scope for the error so we will know what it's named - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - } - value = array_0; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } case Clusters::TargetNavigator::Id: { using namespace Clusters::TargetNavigator; switch (aPath.mAttributeId) { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index 265deb06298007..a86ae6d3234e16 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -1571,6 +1571,95 @@ } } +void CHIPChannelChannelListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPChannelClusterChannelInfo * newElement_0; + newElement_0 = [CHIPChannelClusterChannelInfo new]; + newElement_0.majorNumber = [NSNumber numberWithUnsignedShort:entry_0.majorNumber]; + newElement_0.minorNumber = [NSNumber numberWithUnsignedShort:entry_0.minorNumber]; + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; + newElement_0.callSign = [[NSString alloc] initWithBytes:entry_0.callSign.data() + length:entry_0.callSign.size() + encoding:NSUTF8StringEncoding]; + newElement_0.affiliateCallSign = [[NSString alloc] initWithBytes:entry_0.affiliateCallSign.data() + length:entry_0.affiliateCallSign.size() + encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; + } + { // Scope for the error so we will know what it's named + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPChannelAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + { // Scope for the error so we will know what it's named + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPChannelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + void CHIPColorControlAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { @@ -3823,95 +3912,6 @@ } } -void CHIPTvChannelChannelListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) -{ - NSArray * _Nonnull objCValue; - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - CHIPTvChannelClusterTvChannelInfo * newElement_0; - newElement_0 = [CHIPTvChannelClusterTvChannelInfo new]; - newElement_0.majorNumber = [NSNumber numberWithUnsignedShort:entry_0.majorNumber]; - newElement_0.minorNumber = [NSNumber numberWithUnsignedShort:entry_0.minorNumber]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; - newElement_0.callSign = [[NSString alloc] initWithBytes:entry_0.callSign.data() - length:entry_0.callSign.size() - encoding:NSUTF8StringEncoding]; - newElement_0.affiliateCallSign = [[NSString alloc] initWithBytes:entry_0.affiliateCallSign.data() - length:entry_0.affiliateCallSign.size() - encoding:NSUTF8StringEncoding]; - [array_0 addObject:newElement_0]; - } - { // Scope for the error so we will know what it's named - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); - return; - } - } - objCValue = array_0; - DispatchSuccess(context, objCValue); -}; - -void CHIPTvChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) -{ - auto * self = static_cast(context); - if (!self->mQueue) { - return; - } - - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); - // On failure, mEstablishedHandler will be cleaned up by our destructor, - // but we can clean it up earlier on successful subscription - // establishment. - self->mEstablishedHandler = nil; - } -} - -void CHIPTvChannelAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) -{ - NSArray * _Nonnull objCValue; - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - { // Scope for the error so we will know what it's named - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); - return; - } - } - objCValue = array_0; - DispatchSuccess(context, objCValue); -}; - -void CHIPTvChannelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) -{ - auto * self = static_cast(context); - if (!self->mQueue) { - return; - } - - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); - // On failure, mEstablishedHandler will be cleaned up by our destructor, - // but we can clean it up earlier on successful subscription - // establishment. - self->mEstablishedHandler = nil; - } -} - void CHIPTargetNavigatorTargetNavigatorListListAttributeCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::TargetNavigator::Structs::NavigateTargetTargetInfo::DecodableType> & value) @@ -5019,6 +5019,30 @@ DispatchSuccess(context, response); }; +void CHIPChannelClusterChangeChannelResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType & data) +{ + auto * response = [CHIPChannelClusterChangeChannelResponseParams new]; + { + response.channelMatch = [CHIPChannelClusterChannelInfo new]; + response.channelMatch.majorNumber = [NSNumber numberWithUnsignedShort:data.channelMatch.majorNumber]; + response.channelMatch.minorNumber = [NSNumber numberWithUnsignedShort:data.channelMatch.minorNumber]; + response.channelMatch.name = [[NSString alloc] initWithBytes:data.channelMatch.name.data() + length:data.channelMatch.name.size() + encoding:NSUTF8StringEncoding]; + response.channelMatch.callSign = [[NSString alloc] initWithBytes:data.channelMatch.callSign.data() + length:data.channelMatch.callSign.size() + encoding:NSUTF8StringEncoding]; + response.channelMatch.affiliateCallSign = [[NSString alloc] initWithBytes:data.channelMatch.affiliateCallSign.data() + length:data.channelMatch.affiliateCallSign.size() + encoding:NSUTF8StringEncoding]; + } + { + response.errorType = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.errorType)]; + } + DispatchSuccess(context, response); +}; + void CHIPContentLauncherClusterLaunchContentResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::ContentLauncher::Commands::LaunchContentResponse::DecodableType & data) { @@ -5823,30 +5847,6 @@ DispatchSuccess(context, response); }; -void CHIPTvChannelClusterChangeChannelResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::TvChannel::Commands::ChangeChannelResponse::DecodableType & data) -{ - auto * response = [CHIPTvChannelClusterChangeChannelResponseParams new]; - { - response.channelMatch = [CHIPTvChannelClusterTvChannelInfo new]; - response.channelMatch.majorNumber = [NSNumber numberWithUnsignedShort:data.channelMatch.majorNumber]; - response.channelMatch.minorNumber = [NSNumber numberWithUnsignedShort:data.channelMatch.minorNumber]; - response.channelMatch.name = [[NSString alloc] initWithBytes:data.channelMatch.name.data() - length:data.channelMatch.name.size() - encoding:NSUTF8StringEncoding]; - response.channelMatch.callSign = [[NSString alloc] initWithBytes:data.channelMatch.callSign.data() - length:data.channelMatch.callSign.size() - encoding:NSUTF8StringEncoding]; - response.channelMatch.affiliateCallSign = [[NSString alloc] initWithBytes:data.channelMatch.affiliateCallSign.data() - length:data.channelMatch.affiliateCallSign.size() - encoding:NSUTF8StringEncoding]; - } - { - response.errorType = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.errorType)]; - } - DispatchSuccess(context, response); -}; - void CHIPTargetNavigatorClusterNavigateTargetResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType & data) { @@ -10717,17 +10717,17 @@ } } -void CHIPTvChannelClusterTvChannelErrorTypeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::TvChannel::TvChannelErrorType value) +void CHIPChannelClusterChannelErrorTypeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::Channel::ChannelErrorType value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void CHIPTvChannelClusterTvChannelErrorTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void CHIPChannelClusterChannelErrorTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -10741,8 +10741,8 @@ } } -void CHIPNullableTvChannelClusterTvChannelErrorTypeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPNullableChannelClusterChannelErrorTypeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -10753,9 +10753,9 @@ DispatchSuccess(context, objCValue); }; -void CHIPNullableTvChannelClusterTvChannelErrorTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void CHIPNullableChannelClusterChannelErrorTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -10769,17 +10769,17 @@ } } -void CHIPTvChannelClusterTvChannelLineupInfoTypeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::TvChannel::TvChannelLineupInfoType value) +void CHIPChannelClusterChannelLineupInfoTypeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::Channel::ChannelLineupInfoType value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void CHIPTvChannelClusterTvChannelLineupInfoTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void CHIPChannelClusterChannelLineupInfoTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -10793,8 +10793,8 @@ } } -void CHIPNullableTvChannelClusterTvChannelLineupInfoTypeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPNullableChannelClusterChannelLineupInfoTypeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -10805,10 +10805,9 @@ DispatchSuccess(context, objCValue); }; -void CHIPNullableTvChannelClusterTvChannelLineupInfoTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void CHIPNullableChannelClusterChannelLineupInfoTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h index db13503bea1d50..c056de01336ade 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h @@ -39,6 +39,8 @@ typedef void (*CHIPApplicationLauncherClusterLaunchAppResponseCallbackType)( void *, const chip::app::Clusters::ApplicationLauncher::Commands::LaunchAppResponse::DecodableType &); typedef void (*CHIPApplicationLauncherClusterStopAppResponseCallbackType)( void *, const chip::app::Clusters::ApplicationLauncher::Commands::StopAppResponse::DecodableType &); +typedef void (*CHIPChannelClusterChangeChannelResponseCallbackType)( + void *, const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType &); typedef void (*CHIPContentLauncherClusterLaunchContentResponseCallbackType)( void *, const chip::app::Clusters::ContentLauncher::Commands::LaunchContentResponse::DecodableType &); typedef void (*CHIPContentLauncherClusterLaunchURLResponseCallbackType)( @@ -121,8 +123,6 @@ typedef void (*CHIPScenesClusterStoreSceneResponseCallbackType)( void *, const chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType &); typedef void (*CHIPScenesClusterViewSceneResponseCallbackType)( void *, const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType &); -typedef void (*CHIPTvChannelClusterChangeChannelResponseCallbackType)( - void *, const chip::app::Clusters::TvChannel::Commands::ChangeChannelResponse::DecodableType &); typedef void (*CHIPTargetNavigatorClusterNavigateTargetResponseCallbackType)( void *, const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType &); typedef void (*CHIPTestClusterClusterBooleanResponseCallbackType)( @@ -451,13 +451,12 @@ typedef void (*NullableIasAceClusterIasAcePanelStatusAttributeCallback)( typedef void (*IasAceClusterIasZoneTypeAttributeCallback)(void *, chip::app::Clusters::IasAce::IasZoneType); typedef void (*NullableIasAceClusterIasZoneTypeAttributeCallback)( void *, const chip::app::DataModel::Nullable &); -typedef void (*TvChannelClusterTvChannelErrorTypeAttributeCallback)(void *, chip::app::Clusters::TvChannel::TvChannelErrorType); -typedef void (*NullableTvChannelClusterTvChannelErrorTypeAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*TvChannelClusterTvChannelLineupInfoTypeAttributeCallback)(void *, - chip::app::Clusters::TvChannel::TvChannelLineupInfoType); -typedef void (*NullableTvChannelClusterTvChannelLineupInfoTypeAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); +typedef void (*ChannelClusterChannelErrorTypeAttributeCallback)(void *, chip::app::Clusters::Channel::ChannelErrorType); +typedef void (*NullableChannelClusterChannelErrorTypeAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*ChannelClusterChannelLineupInfoTypeAttributeCallback)(void *, chip::app::Clusters::Channel::ChannelLineupInfoType); +typedef void (*NullableChannelClusterChannelLineupInfoTypeAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); typedef void (*TargetNavigatorClusterNavigateTargetStatusAttributeCallback)( void *, chip::app::Clusters::TargetNavigator::NavigateTargetStatus); typedef void (*NullableTargetNavigatorClusterNavigateTargetStatusAttributeCallback)( @@ -1794,6 +1793,60 @@ class CHIPBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge SubscriptionEstablishedHandler mEstablishedHandler; }; +class CHIPChannelChannelListListAttributeCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPChannelChannelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn( + void * context, + const chip::app::DataModel::DecodableList & value); +}; + +class CHIPChannelChannelListListAttributeCallbackSubscriptionBridge : public CHIPChannelChannelListListAttributeCallbackBridge +{ +public: + CHIPChannelChannelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPChannelChannelListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPChannelAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPChannelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPChannelAttributeListListAttributeCallbackSubscriptionBridge : public CHIPChannelAttributeListListAttributeCallbackBridge +{ +public: + CHIPChannelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPChannelAttributeListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + class CHIPColorControlAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -3384,61 +3437,6 @@ class CHIPSwitchAttributeListListAttributeCallbackSubscriptionBridge : public CH SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPTvChannelChannelListListAttributeCallbackBridge : public CHIPCallbackBridge -{ -public: - CHIPTvChannelChannelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - - static void OnSuccessFn( - void * context, - const chip::app::DataModel::DecodableList & value); -}; - -class CHIPTvChannelChannelListListAttributeCallbackSubscriptionBridge : public CHIPTvChannelChannelListListAttributeCallbackBridge -{ -public: - CHIPTvChannelChannelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPTvChannelChannelListListAttributeCallbackBridge(queue, handler, action, true), - mEstablishedHandler(establishedHandler) - {} - - static void OnSubscriptionEstablished(void * context); - -private: - SubscriptionEstablishedHandler mEstablishedHandler; -}; - -class CHIPTvChannelAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge -{ -public: - CHIPTvChannelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); -}; - -class CHIPTvChannelAttributeListListAttributeCallbackSubscriptionBridge - : public CHIPTvChannelAttributeListListAttributeCallbackBridge -{ -public: - CHIPTvChannelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPTvChannelAttributeListListAttributeCallbackBridge(queue, handler, action, true), - mEstablishedHandler(establishedHandler) - {} - - static void OnSubscriptionEstablished(void * context); - -private: - SubscriptionEstablishedHandler mEstablishedHandler; -}; - class CHIPTargetNavigatorTargetNavigatorListListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -4109,6 +4107,18 @@ class CHIPApplicationLauncherClusterStopAppResponseCallbackBridge const chip::app::Clusters::ApplicationLauncher::Commands::StopAppResponse::DecodableType & data); }; +class CHIPChannelClusterChangeChannelResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPChannelClusterChangeChannelResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, + const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType & data); +}; + class CHIPContentLauncherClusterLaunchContentResponseCallbackBridge : public CHIPCallbackBridge { @@ -4618,18 +4628,6 @@ class CHIPScenesClusterViewSceneResponseCallbackBridge : public CHIPCallbackBrid static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType & data); }; -class CHIPTvChannelClusterChangeChannelResponseCallbackBridge - : public CHIPCallbackBridge -{ -public: - CHIPTvChannelClusterChangeChannelResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::TvChannel::Commands::ChangeChannelResponse::DecodableType & data); -}; - class CHIPTargetNavigatorClusterNavigateTargetResponseCallbackBridge : public CHIPCallbackBridge { @@ -9958,25 +9956,25 @@ class CHIPNullableIasAceClusterIasZoneTypeAttributeCallbackSubscriptionBridge SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPTvChannelClusterTvChannelErrorTypeAttributeCallbackBridge - : public CHIPCallbackBridge +class CHIPChannelClusterChannelErrorTypeAttributeCallbackBridge + : public CHIPCallbackBridge { public: - CHIPTvChannelClusterTvChannelErrorTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + CHIPChannelClusterChannelErrorTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, chip::app::Clusters::TvChannel::TvChannelErrorType value); + static void OnSuccessFn(void * context, chip::app::Clusters::Channel::ChannelErrorType value); }; -class CHIPTvChannelClusterTvChannelErrorTypeAttributeCallbackSubscriptionBridge - : public CHIPTvChannelClusterTvChannelErrorTypeAttributeCallbackBridge +class CHIPChannelClusterChannelErrorTypeAttributeCallbackSubscriptionBridge + : public CHIPChannelClusterChannelErrorTypeAttributeCallbackBridge { public: - CHIPTvChannelClusterTvChannelErrorTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPTvChannelClusterTvChannelErrorTypeAttributeCallbackBridge(queue, handler, action, true), + CHIPChannelClusterChannelErrorTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPChannelClusterChannelErrorTypeAttributeCallbackBridge(queue, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9986,27 +9984,27 @@ class CHIPTvChannelClusterTvChannelErrorTypeAttributeCallbackSubscriptionBridge SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPNullableTvChannelClusterTvChannelErrorTypeAttributeCallbackBridge - : public CHIPCallbackBridge +class CHIPNullableChannelClusterChannelErrorTypeAttributeCallbackBridge + : public CHIPCallbackBridge { public: - CHIPNullableTvChannelClusterTvChannelErrorTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + CHIPNullableChannelClusterChannelErrorTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class CHIPNullableTvChannelClusterTvChannelErrorTypeAttributeCallbackSubscriptionBridge - : public CHIPNullableTvChannelClusterTvChannelErrorTypeAttributeCallbackBridge +class CHIPNullableChannelClusterChannelErrorTypeAttributeCallbackSubscriptionBridge + : public CHIPNullableChannelClusterChannelErrorTypeAttributeCallbackBridge { public: - CHIPNullableTvChannelClusterTvChannelErrorTypeAttributeCallbackSubscriptionBridge( + CHIPNullableChannelClusterChannelErrorTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, SubscriptionEstablishedHandler establishedHandler) : - CHIPNullableTvChannelClusterTvChannelErrorTypeAttributeCallbackBridge(queue, handler, action, true), + CHIPNullableChannelClusterChannelErrorTypeAttributeCallbackBridge(queue, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10016,26 +10014,25 @@ class CHIPNullableTvChannelClusterTvChannelErrorTypeAttributeCallbackSubscriptio SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPTvChannelClusterTvChannelLineupInfoTypeAttributeCallbackBridge - : public CHIPCallbackBridge +class CHIPChannelClusterChannelLineupInfoTypeAttributeCallbackBridge + : public CHIPCallbackBridge { public: - CHIPTvChannelClusterTvChannelLineupInfoTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + CHIPChannelClusterChannelLineupInfoTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, chip::app::Clusters::TvChannel::TvChannelLineupInfoType value); + static void OnSuccessFn(void * context, chip::app::Clusters::Channel::ChannelLineupInfoType value); }; -class CHIPTvChannelClusterTvChannelLineupInfoTypeAttributeCallbackSubscriptionBridge - : public CHIPTvChannelClusterTvChannelLineupInfoTypeAttributeCallbackBridge +class CHIPChannelClusterChannelLineupInfoTypeAttributeCallbackSubscriptionBridge + : public CHIPChannelClusterChannelLineupInfoTypeAttributeCallbackBridge { public: - CHIPTvChannelClusterTvChannelLineupInfoTypeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPTvChannelClusterTvChannelLineupInfoTypeAttributeCallbackBridge(queue, handler, action, true), + CHIPChannelClusterChannelLineupInfoTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPChannelClusterChannelLineupInfoTypeAttributeCallbackBridge(queue, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10045,27 +10042,27 @@ class CHIPTvChannelClusterTvChannelLineupInfoTypeAttributeCallbackSubscriptionBr SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPNullableTvChannelClusterTvChannelLineupInfoTypeAttributeCallbackBridge - : public CHIPCallbackBridge +class CHIPNullableChannelClusterChannelLineupInfoTypeAttributeCallbackBridge + : public CHIPCallbackBridge { public: - CHIPNullableTvChannelClusterTvChannelLineupInfoTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + CHIPNullableChannelClusterChannelLineupInfoTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class CHIPNullableTvChannelClusterTvChannelLineupInfoTypeAttributeCallbackSubscriptionBridge - : public CHIPNullableTvChannelClusterTvChannelLineupInfoTypeAttributeCallbackBridge +class CHIPNullableChannelClusterChannelLineupInfoTypeAttributeCallbackSubscriptionBridge + : public CHIPNullableChannelClusterChannelLineupInfoTypeAttributeCallbackBridge { public: - CHIPNullableTvChannelClusterTvChannelLineupInfoTypeAttributeCallbackSubscriptionBridge( + CHIPNullableChannelClusterChannelLineupInfoTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, SubscriptionEstablishedHandler establishedHandler) : - CHIPNullableTvChannelClusterTvChannelLineupInfoTypeAttributeCallbackBridge(queue, handler, action, true), + CHIPNullableChannelClusterChannelLineupInfoTypeAttributeCallbackBridge(queue, handler, action, true), mEstablishedHandler(establishedHandler) {} diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index 18ca18770e82e0..f425a31c59c915 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -663,6 +663,39 @@ NS_ASSUME_NONNULL_BEGIN @end +/** + * Cluster Channel + * + */ +@interface CHIPChannel : CHIPCluster + +- (void)changeChannelWithParams:(CHIPChannelClusterChangeChannelParams *)params + completionHandler:(void (^)(CHIPChannelClusterChangeChannelResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)changeChannelByNumberWithParams:(CHIPChannelClusterChangeChannelByNumberParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)skipChannelWithParams:(CHIPChannelClusterSkipChannelParams *)params completionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeChannelListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeChannelListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; + +@end + /** * Cluster Color Control * @@ -3332,39 +3365,6 @@ NS_ASSUME_NONNULL_BEGIN @end -/** - * Cluster TV Channel - * - */ -@interface CHIPTvChannel : CHIPCluster - -- (void)changeChannelWithParams:(CHIPTvChannelClusterChangeChannelParams *)params - completionHandler:(void (^)(CHIPTvChannelClusterChangeChannelResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)changeChannelByNumberWithParams:(CHIPTvChannelClusterChangeChannelByNumberParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)skipChannelWithParams:(CHIPTvChannelClusterSkipChannelParams *)params completionHandler:(StatusCompletion)completionHandler; - -- (void)readAttributeChannelListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeChannelListWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - -@end - /** * Cluster Target Navigator * diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 610c1597299347..efa385dcb086f4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -2708,6 +2708,139 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( @end +@implementation CHIPChannel + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)changeChannelWithParams:(CHIPChannelClusterChangeChannelParams *)params + completionHandler:(void (^)(CHIPChannelClusterChangeChannelResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + ListFreer listFreer; + Channel::Commands::ChangeChannel::Type request; + request.match = [self asCharSpan:params.match]; + + new CHIPChannelClusterChangeChannelResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)changeChannelByNumberWithParams:(CHIPChannelClusterChangeChannelByNumberParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + ListFreer listFreer; + Channel::Commands::ChangeChannelByNumber::Type request; + request.majorNumber = params.majorNumber.unsignedShortValue; + request.minorNumber = params.minorNumber.unsignedShortValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)skipChannelWithParams:(CHIPChannelClusterSkipChannelParams *)params completionHandler:(StatusCompletion)completionHandler +{ + ListFreer listFreer; + Channel::Commands::SkipChannel::Type request; + request.count = params.count.unsignedShortValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)readAttributeChannelListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPChannelChannelListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeChannelListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPChannelChannelListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPChannelAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + +@end + @implementation CHIPColorControl - (chip::Controller::ClusterBase *)getCluster @@ -13739,140 +13872,6 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( @end -@implementation CHIPTvChannel - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)changeChannelWithParams:(CHIPTvChannelClusterChangeChannelParams *)params - completionHandler:(void (^)(CHIPTvChannelClusterChangeChannelResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - ListFreer listFreer; - TvChannel::Commands::ChangeChannel::Type request; - request.match = [self asCharSpan:params.match]; - - new CHIPTvChannelClusterChangeChannelResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)changeChannelByNumberWithParams:(CHIPTvChannelClusterChangeChannelByNumberParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - ListFreer listFreer; - TvChannel::Commands::ChangeChannelByNumber::Type request; - request.majorNumber = params.majorNumber.unsignedShortValue; - request.minorNumber = params.minorNumber.unsignedShortValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)skipChannelWithParams:(CHIPTvChannelClusterSkipChannelParams *)params completionHandler:(StatusCompletion)completionHandler -{ - ListFreer listFreer; - TvChannel::Commands::SkipChannel::Type request; - request.count = params.count.unsignedShortValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)readAttributeChannelListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPTvChannelChannelListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TvChannel::Attributes::ChannelList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeChannelListWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPTvChannelChannelListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TvChannel::Attributes::ChannelList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, - CHIPTvChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); - }, - subscriptionEstablishedHandler); -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPTvChannelAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TvChannel::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TvChannel::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TvChannel::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); - }, - subscriptionEstablishedHandler); -} - -@end - @implementation CHIPTargetNavigator - (chip::Controller::ClusterBase *)getCluster diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h index 64b30b5637d32c..043118d96a06a5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h @@ -73,6 +73,10 @@ @property (readonly) chip::Controller::BridgedDeviceBasicCluster cppCluster; @end +@interface CHIPChannel () +@property (readonly) chip::Controller::ChannelCluster cppCluster; +@end + @interface CHIPColorControl () @property (readonly) chip::Controller::ColorControlCluster cppCluster; @end @@ -217,10 +221,6 @@ @property (readonly) chip::Controller::SwitchCluster cppCluster; @end -@interface CHIPTvChannel () -@property (readonly) chip::Controller::TvChannelCluster cppCluster; -@end - @interface CHIPTargetNavigator () @property (readonly) chip::Controller::TargetNavigatorCluster cppCluster; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h index cf8cf14d32928b..10f3d76cc1fe3f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h @@ -1503,24 +1503,24 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)init; @end -@interface CHIPTvChannelClusterChangeChannelParams : NSObject +@interface CHIPChannelClusterChangeChannelParams : NSObject @property (strong, nonatomic) NSString * _Nonnull match; - (instancetype)init; @end -@interface CHIPTvChannelClusterChangeChannelResponseParams : NSObject -@property (strong, nonatomic) CHIPTvChannelClusterTvChannelInfo * _Nonnull channelMatch; +@interface CHIPChannelClusterChangeChannelResponseParams : NSObject +@property (strong, nonatomic) CHIPChannelClusterChannelInfo * _Nonnull channelMatch; @property (strong, nonatomic) NSNumber * _Nonnull errorType; - (instancetype)init; @end -@interface CHIPTvChannelClusterChangeChannelByNumberParams : NSObject +@interface CHIPChannelClusterChangeChannelByNumberParams : NSObject @property (strong, nonatomic) NSNumber * _Nonnull majorNumber; @property (strong, nonatomic) NSNumber * _Nonnull minorNumber; - (instancetype)init; @end -@interface CHIPTvChannelClusterSkipChannelParams : NSObject +@interface CHIPChannelClusterSkipChannelParams : NSObject @property (strong, nonatomic, getter=getCount) NSNumber * _Nonnull count; - (instancetype)init; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm index aca7fdd8024222..f044a8902454eb 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm @@ -3189,7 +3189,7 @@ - (instancetype)init } @end -@implementation CHIPTvChannelClusterChangeChannelParams +@implementation CHIPChannelClusterChangeChannelParams - (instancetype)init { if (self = [super init]) { @@ -3200,12 +3200,12 @@ - (instancetype)init } @end -@implementation CHIPTvChannelClusterChangeChannelResponseParams +@implementation CHIPChannelClusterChangeChannelResponseParams - (instancetype)init { if (self = [super init]) { - _channelMatch = [CHIPTvChannelClusterTvChannelInfo new]; + _channelMatch = [CHIPChannelClusterChannelInfo new]; _errorType = @(0); } @@ -3213,7 +3213,7 @@ - (instancetype)init } @end -@implementation CHIPTvChannelClusterChangeChannelByNumberParams +@implementation CHIPChannelClusterChangeChannelByNumberParams - (instancetype)init { if (self = [super init]) { @@ -3226,7 +3226,7 @@ - (instancetype)init } @end -@implementation CHIPTvChannelClusterSkipChannelParams +@implementation CHIPChannelClusterSkipChannelParams - (instancetype)init { if (self = [super init]) { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h index 9c6267167c22df..d8e451be2ceb65 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h @@ -283,7 +283,7 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)init; @end -@interface CHIPTvChannelClusterTvChannelInfo : NSObject +@interface CHIPChannelClusterChannelInfo : NSObject @property (strong, nonatomic) NSNumber * _Nonnull majorNumber; @property (strong, nonatomic) NSNumber * _Nonnull minorNumber; @property (strong, nonatomic) NSString * _Nonnull name; @@ -292,7 +292,7 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)init; @end -@interface CHIPTvChannelClusterTvChannelLineupInfo : NSObject +@interface CHIPChannelClusterChannelLineupInfo : NSObject @property (strong, nonatomic) NSString * _Nonnull operatorName; @property (strong, nonatomic) NSString * _Nonnull lineupName; @property (strong, nonatomic) NSString * _Nonnull postalCode; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm index 00e1b8bd5e8b4d..f29ed660ca64f4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm @@ -570,7 +570,7 @@ - (instancetype)init } @end -@implementation CHIPTvChannelClusterTvChannelInfo +@implementation CHIPChannelClusterChannelInfo - (instancetype)init { if (self = [super init]) { @@ -589,7 +589,7 @@ - (instancetype)init } @end -@implementation CHIPTvChannelClusterTvChannelLineupInfo +@implementation CHIPChannelClusterChannelLineupInfo - (instancetype)init { if (self = [super init]) { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h index b6103a5cacdcde..bd127efcff1266 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -207,6 +207,18 @@ NS_ASSUME_NONNULL_BEGIN @end +/** + * Cluster Channel + * + */ +@interface CHIPTestChannel : CHIPChannel + +- (void)writeAttributeChannelListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; + +@end + /** * Cluster Color Control * @@ -813,18 +825,6 @@ NS_ASSUME_NONNULL_BEGIN @end -/** - * Cluster TV Channel - * - */ -@interface CHIPTestTvChannel : CHIPTvChannel - -- (void)writeAttributeChannelListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - -@end - /** * Cluster Target Navigator * diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index 228add49464638..e6caff5b17503f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -1736,6 +1736,119 @@ new CHIPDefaultSuccessCallbackBridge( @end +@interface CHIPTestChannel () +@property (readonly) chip::Controller::ChannelClusterTest cppCluster; +@end + +@implementation CHIPTestChannel + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeChannelListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPChannelClusterChannelInfo class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (CHIPChannelClusterChannelInfo *) value[i_0]; + listHolder_0->mList[i_0].majorNumber = element_0.majorNumber.unsignedShortValue; + listHolder_0->mList[i_0].minorNumber = element_0.minorNumber.unsignedShortValue; + listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; + listHolder_0->mList[i_0].callSign = [self asCharSpan:element_0.callSign]; + listHolder_0->mList[i_0].affiliateCallSign = [self asCharSpan:element_0.affiliateCallSign]; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +@end + @interface CHIPTestColorControl () @property (readonly) chip::Controller::ColorControlClusterTest cppCluster; @end @@ -8179,119 +8292,6 @@ new CHIPDefaultSuccessCallbackBridge( @end -@interface CHIPTestTvChannel () -@property (readonly) chip::Controller::TvChannelClusterTest cppCluster; -@end - -@implementation CHIPTestTvChannel - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)writeAttributeChannelListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TvChannel::Attributes::ChannelList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[CHIPTvChannelClusterTvChannelInfo class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (CHIPTvChannelClusterTvChannelInfo *) value[i_0]; - listHolder_0->mList[i_0].majorNumber = element_0.majorNumber.unsignedShortValue; - listHolder_0->mList[i_0].minorNumber = element_0.minorNumber.unsignedShortValue; - listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; - listHolder_0->mList[i_0].callSign = [self asCharSpan:element_0.callSign]; - listHolder_0->mList[i_0].affiliateCallSign = [self asCharSpan:element_0.affiliateCallSign]; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TvChannel::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TvChannel::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -@end - @interface CHIPTestTargetNavigator () @property (readonly) chip::Controller::TargetNavigatorClusterTest cppCluster; @end diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 0e59cd44bfe3e3..9c4be6de85347e 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -36506,6 +36506,78 @@ - (void)testSendClusterBridgedDeviceBasicReadAttributeClusterRevisionWithComplet [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterChannelReadAttributeChannelListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPChannel * cluster = [[CHIPChannel alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = [self expectationWithDescription:@"ChannelReadAttributeChannelListWithCompletionHandler"]; + + [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Channel ChannelList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterChannelReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPChannel * cluster = [[CHIPChannel alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = [self expectationWithDescription:@"ChannelReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Channel AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterChannelReadAttributeClusterRevisionWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPChannel * cluster = [[CHIPChannel alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = [self expectationWithDescription:@"ChannelReadAttributeClusterRevisionWithCompletionHandler"]; + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Channel ClusterRevision Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterColorControlReadAttributeCurrentHueWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -45156,79 +45228,6 @@ - (void)testSendClusterSwitchReadAttributeClusterRevisionWithCompletionHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTvChannelReadAttributeChannelListWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPTvChannel * cluster = [[CHIPTvChannel alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = [self expectationWithDescription:@"TvChannelReadAttributeChannelListWithCompletionHandler"]; - - [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TvChannel ChannelList Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterTvChannelReadAttributeAttributeListWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPTvChannel * cluster = [[CHIPTvChannel alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = [self expectationWithDescription:@"TvChannelReadAttributeAttributeListWithCompletionHandler"]; - - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TvChannel AttributeList Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - -- (void)testSendClusterTvChannelReadAttributeClusterRevisionWithCompletionHandler -{ - dispatch_queue_t queue = dispatch_get_main_queue(); - - XCTestExpectation * connectedExpectation = - [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - WaitForCommissionee(connectedExpectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; - - CHIPDevice * device = GetConnectedDevice(); - CHIPTvChannel * cluster = [[CHIPTvChannel alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - XCTestExpectation * expectation = - [self expectationWithDescription:@"TvChannelReadAttributeClusterRevisionWithCompletionHandler"]; - - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TvChannel ClusterRevision Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - - (void)testSendClusterTargetNavigatorReadAttributeTargetNavigatorListWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); diff --git a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h index 680e3956880da8..d940c9b06bfcad 100644 --- a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h @@ -35,6 +35,7 @@ MatterBooleanStatePluginServerInitCallback(); \ MatterBridgedActionsPluginServerInitCallback(); \ MatterBridgedDeviceBasicPluginServerInitCallback(); \ + MatterChannelPluginServerInitCallback(); \ MatterColorControlPluginServerInitCallback(); \ MatterContentLauncherPluginServerInitCallback(); \ MatterDescriptorPluginServerInitCallback(); \ @@ -72,7 +73,6 @@ MatterScenesPluginServerInitCallback(); \ MatterSoftwareDiagnosticsPluginServerInitCallback(); \ MatterSwitchPluginServerInitCallback(); \ - MatterTvChannelPluginServerInitCallback(); \ MatterTargetNavigatorPluginServerInitCallback(); \ MatterTemperatureMeasurementPluginServerInitCallback(); \ MatterTestClusterPluginServerInitCallback(); \ diff --git a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp index e3bf8404a56bf2..e609c8bf2420a3 100644 --- a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp @@ -68,6 +68,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID: emberAfBridgedDeviceBasicClusterInitCallback(endpoint); break; + case ZCL_CHANNEL_CLUSTER_ID: + emberAfChannelClusterInitCallback(endpoint); + break; case ZCL_COLOR_CONTROL_CLUSTER_ID: emberAfColorControlClusterInitCallback(endpoint); break; @@ -179,9 +182,6 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_SWITCH_CLUSTER_ID: emberAfSwitchClusterInitCallback(endpoint); break; - case ZCL_TV_CHANNEL_CLUSTER_ID: - emberAfTvChannelClusterInitCallback(endpoint); - break; case ZCL_TARGET_NAVIGATOR_CLUSTER_ID: emberAfTargetNavigatorClusterInitCallback(endpoint); break; @@ -283,6 +283,11 @@ void __attribute__((weak)) emberAfBridgedDeviceBasicClusterInitCallback(Endpoint // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfChannelClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfColorControlClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -468,11 +473,6 @@ void __attribute__((weak)) emberAfSwitchClusterInitCallback(EndpointId endpoint) // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfTvChannelClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfTargetNavigatorClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 7065f4a7a36911..a66274bb518f5b 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -393,7 +393,7 @@ /* 1458 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: TV Channel (server), big-endian */ \ + /* Endpoint: 1, Cluster: Channel (server), big-endian */ \ \ /* 1466 - channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1064,7 +1064,7 @@ /* 1458 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: TV Channel (server), little-endian */ \ + /* Endpoint: 1, Cluster: Channel (server), little-endian */ \ \ /* 1466 - channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -2071,7 +2071,7 @@ { 0x0000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* wake on lan mac address */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ - /* Endpoint: 1, Cluster: TV Channel (server) */ \ + /* Endpoint: 1, Cluster: Channel (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1466) }, /* channel list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ @@ -2568,7 +2568,7 @@ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ 0x0504, ZAP_ATTRIBUTE_INDEX(445), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ - }, /* Endpoint: 1, Cluster: TV Channel (server) */ \ + }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ 0x0505, ZAP_ATTRIBUTE_INDEX(447), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ diff --git a/zzz_generated/all-clusters-app/zap-generated/gen_config.h b/zzz_generated/all-clusters-app/zap-generated/gen_config.h index 146562cb706c90..f3d653e43ab817 100644 --- a/zzz_generated/all-clusters-app/zap-generated/gen_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/gen_config.h @@ -42,6 +42,7 @@ #define EMBER_AF_BOOLEAN_STATE_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_BRIDGED_ACTIONS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_BRIDGED_DEVICE_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_CHANNEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_CONTENT_LAUNCH_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_DESCRIPTOR_CLUSTER_SERVER_ENDPOINT_COUNT (3) @@ -79,7 +80,6 @@ #define EMBER_AF_SCENES_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_SOFTWARE_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_SWITCH_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_TV_CHANNEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TARGET_NAVIGATOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TEMP_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TEST_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -158,6 +158,11 @@ #define EMBER_AF_PLUGIN_BRIDGED_DEVICE_BASIC_SERVER #define EMBER_AF_PLUGIN_BRIDGED_DEVICE_BASIC +// Use this macro to check if the server side of the Channel cluster is included +#define ZCL_USING_CHANNEL_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_CHANNEL_SERVER +#define EMBER_AF_PLUGIN_CHANNEL + // Use this macro to check if the server side of the Color Control cluster is included #define ZCL_USING_COLOR_CONTROL_CLUSTER_SERVER #define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER @@ -355,11 +360,6 @@ #define EMBER_AF_PLUGIN_SWITCH_SERVER #define EMBER_AF_PLUGIN_SWITCH -// Use this macro to check if the server side of the TV Channel cluster is included -#define ZCL_USING_TV_CHANNEL_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_TV_CHANNEL_SERVER -#define EMBER_AF_PLUGIN_TV_CHANNEL - // Use this macro to check if the server side of the Target Navigator cluster is included #define ZCL_USING_TARGET_NAVIGATOR_CLUSTER_SERVER #define EMBER_AF_PLUGIN_TARGET_NAVIGATOR_SERVER diff --git a/zzz_generated/app-common/app-common/zap-generated/af-structs.h b/zzz_generated/app-common/app-common/zap-generated/af-structs.h index d8e7b831abcbb4..9a53c416ff8cff 100644 --- a/zzz_generated/app-common/app-common/zap-generated/af-structs.h +++ b/zzz_generated/app-common/app-common/zap-generated/af-structs.h @@ -204,6 +204,25 @@ typedef struct _BatFaultChangeType /* TYPE WARNING: array array defaults to */ uint8_t * previous; } BatFaultChangeType; +// Struct for ChannelInfo +typedef struct _ChannelInfo +{ + uint16_t majorNumber; + uint16_t minorNumber; + chip::CharSpan name; + chip::CharSpan callSign; + chip::CharSpan affiliateCallSign; +} ChannelInfo; + +// Struct for ChannelLineupInfo +typedef struct _ChannelLineupInfo +{ + chip::CharSpan operatorName; + chip::CharSpan lineupName; + chip::CharSpan postalCode; + uint8_t lineupInfoType; +} ChannelLineupInfo; + // Struct for DeviceType typedef struct _DeviceType { @@ -502,25 +521,6 @@ typedef struct _TransferredPhase uint16_t maxActivationDelay; } TransferredPhase; -// Struct for TvChannelInfo -typedef struct _TvChannelInfo -{ - uint16_t majorNumber; - uint16_t minorNumber; - chip::CharSpan name; - chip::CharSpan callSign; - chip::CharSpan affiliateCallSign; -} TvChannelInfo; - -// Struct for TvChannelLineupInfo -typedef struct _TvChannelLineupInfo -{ - chip::CharSpan operatorName; - chip::CharSpan lineupName; - chip::CharSpan postalCode; - uint8_t lineupInfoType; -} TvChannelLineupInfo; - // Struct for WiFiInterfaceScanResult typedef struct _WiFiInterfaceScanResult { diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h index 9ddbd1f7a19abf..54185ded04fe9e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h @@ -1361,14 +1361,14 @@ // Server attributes #define ZCL_WAKE_ON_LAN_MAC_ADDRESS_ATTRIBUTE_ID (0x0000) -// Attribute ids for cluster: TV Channel +// Attribute ids for cluster: Channel // Client attributes // Server attributes -#define ZCL_TV_CHANNEL_LIST_ATTRIBUTE_ID (0x0000) -#define ZCL_TV_CHANNEL_LINEUP_ATTRIBUTE_ID (0x0001) -#define ZCL_TV_CHANNEL_CURRENT_CHANNEL_ATTRIBUTE_ID (0x0002) +#define ZCL_CHANNEL_LIST_ATTRIBUTE_ID (0x0000) +#define ZCL_CHANNEL_LINEUP_ATTRIBUTE_ID (0x0001) +#define ZCL_CHANNEL_CURRENT_CHANNEL_ATTRIBUTE_ID (0x0002) // Attribute ids for cluster: Target Navigator diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index f198a0ce5a77c1..e4659fa3262346 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -27733,7 +27733,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace Attributes } // namespace WakeOnLan -namespace TvChannel { +namespace Channel { namespace Attributes { namespace FeatureMap { @@ -27742,7 +27742,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TvChannel::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Channel::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -27760,7 +27760,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::TvChannel::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Channel::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -27771,7 +27771,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TvChannel::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Channel::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -27789,13 +27789,13 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::TvChannel::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Channel::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace TvChannel +} // namespace Channel namespace TargetNavigator { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 98542cd1c87708..9484af5ea246b7 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -5185,7 +5185,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace Attributes } // namespace WakeOnLan -namespace TvChannel { +namespace Channel { namespace Attributes { namespace FeatureMap { @@ -5199,7 +5199,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace ClusterRevision } // namespace Attributes -} // namespace TvChannel +} // namespace Channel namespace TargetNavigator { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 2b178c56963930..a4609fd3a5ef19 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -837,13 +837,13 @@ void emberAfIasWdClusterInitCallback(chip::EndpointId endpoint); */ void emberAfWakeOnLanClusterInitCallback(chip::EndpointId endpoint); -/** @brief TV Channel Cluster Init +/** @brief Channel Cluster Init * * Cluster Init * * @param endpoint Endpoint that is being initialized */ -void emberAfTvChannelClusterInitCallback(chip::EndpointId endpoint); +void emberAfChannelClusterInitCallback(chip::EndpointId endpoint); /** @brief Target Navigator Cluster Init * @@ -11376,42 +11376,42 @@ void emberAfWakeOnLanClusterServerTickCallback(chip::EndpointId endpoint); void emberAfWakeOnLanClusterClientTickCallback(chip::EndpointId endpoint); // -// TV Channel Cluster +// Channel Cluster // -/** @brief TV Channel Cluster Server Init +/** @brief Channel Cluster Server Init * * Server Init * * @param endpoint Endpoint that is being initialized */ -void emberAfTvChannelClusterServerInitCallback(chip::EndpointId endpoint); +void emberAfChannelClusterServerInitCallback(chip::EndpointId endpoint); -/** @brief TV Channel Cluster Client Init +/** @brief Channel Cluster Client Init * * Client Init * * @param endpoint Endpoint that is being initialized */ -void emberAfTvChannelClusterClientInitCallback(chip::EndpointId endpoint); +void emberAfChannelClusterClientInitCallback(chip::EndpointId endpoint); -/** @brief TV Channel Cluster Server Attribute Changed +/** @brief Channel Cluster Server Attribute Changed * * Server Attribute Changed * * @param attributePath Concrete attribute path that changed */ -void MatterTvChannelClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); +void MatterChannelClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); -/** @brief TV Channel Cluster Client Attribute Changed +/** @brief Channel Cluster Client Attribute Changed * * Client Attribute Changed * * @param attributePath Concrete attribute path that changed */ -void MatterTvChannelClusterClientAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); +void MatterChannelClusterClientAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); -/** @brief TV Channel Cluster Server Message Sent +/** @brief Channel Cluster Server Message Sent * * Server Message Sent * @@ -11421,10 +11421,10 @@ void MatterTvChannelClusterClientAttributeChangedCallback(const chip::app::Concr * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTvChannelClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfChannelClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); -/** @brief TV Channel Cluster Client Message Sent +/** @brief Channel Cluster Client Message Sent * * Client Message Sent * @@ -11434,10 +11434,10 @@ void emberAfTvChannelClusterServerMessageSentCallback(const chip::MessageSendDes * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTvChannelClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfChannelClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); -/** @brief TV Channel Cluster Server Pre Attribute Changed +/** @brief Channel Cluster Server Pre Attribute Changed * * Server Pre Attribute Changed * @@ -11447,10 +11447,10 @@ void emberAfTvChannelClusterClientMessageSentCallback(const chip::MessageSendDes * @param value Attribute value */ chip::Protocols::InteractionModel::Status -MatterTvChannelClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, - EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); +MatterChannelClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); -/** @brief TV Channel Cluster Client Pre Attribute Changed +/** @brief Channel Cluster Client Pre Attribute Changed * * Client Pre Attribute Changed * @@ -11460,24 +11460,24 @@ MatterTvChannelClusterServerPreAttributeChangedCallback(const chip::app::Concret * @param value Attribute value */ chip::Protocols::InteractionModel::Status -MatterTvChannelClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, - EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); +MatterChannelClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); -/** @brief TV Channel Cluster Server Tick +/** @brief Channel Cluster Server Tick * * Server Tick * * @param endpoint Endpoint that is being served */ -void emberAfTvChannelClusterServerTickCallback(chip::EndpointId endpoint); +void emberAfChannelClusterServerTickCallback(chip::EndpointId endpoint); -/** @brief TV Channel Cluster Client Tick +/** @brief Channel Cluster Client Tick * * Client Tick * * @param endpoint Endpoint that is being served */ -void emberAfTvChannelClusterClientTickCallback(chip::EndpointId endpoint); +void emberAfChannelClusterClientTickCallback(chip::EndpointId endpoint); // // Target Navigator Cluster @@ -14769,29 +14769,29 @@ bool emberAfIasWdClusterStartWarningCallback(chip::app::CommandHandler * command bool emberAfIasWdClusterSquawkCallback(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::IasWd::Commands::Squawk::DecodableType & commandData); /** - * @brief TV Channel Cluster ChangeChannel Command callback (from client) + * @brief Channel Cluster ChangeChannel Command callback (from client) */ -bool emberAfTvChannelClusterChangeChannelCallback( +bool emberAfChannelClusterChangeChannelCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::TvChannel::Commands::ChangeChannel::DecodableType & commandData); + const chip::app::Clusters::Channel::Commands::ChangeChannel::DecodableType & commandData); /** - * @brief TV Channel Cluster ChangeChannelResponse Command callback (from server) + * @brief Channel Cluster ChangeChannelResponse Command callback (from server) */ -bool emberAfTvChannelClusterChangeChannelResponseCallback( +bool emberAfChannelClusterChangeChannelResponseCallback( chip::EndpointId endpoint, chip::app::CommandSender * commandObj, - chip::app::Clusters::TvChannel::Structs::TvChannelInfo::DecodableType channelMatch, uint8_t errorType); + chip::app::Clusters::Channel::Structs::ChannelInfo::DecodableType channelMatch, uint8_t errorType); /** - * @brief TV Channel Cluster ChangeChannelByNumber Command callback (from client) + * @brief Channel Cluster ChangeChannelByNumber Command callback (from client) */ -bool emberAfTvChannelClusterChangeChannelByNumberCallback( +bool emberAfChannelClusterChangeChannelByNumberCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::TvChannel::Commands::ChangeChannelByNumber::DecodableType & commandData); + const chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::DecodableType & commandData); /** - * @brief TV Channel Cluster SkipChannel Command callback (from client) + * @brief Channel Cluster SkipChannel Command callback (from client) */ -bool emberAfTvChannelClusterSkipChannelCallback( +bool emberAfChannelClusterSkipChannelCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::TvChannel::Commands::SkipChannel::DecodableType & commandData); + const chip::app::Clusters::Channel::Commands::SkipChannel::DecodableType & commandData); /** * @brief Target Navigator Cluster NavigateTarget Command callback (from client) */ diff --git a/zzz_generated/app-common/app-common/zap-generated/callbacks/PluginCallbacks.h b/zzz_generated/app-common/app-common/zap-generated/callbacks/PluginCallbacks.h index 99c87b1f349b7c..1f3bd616d38308 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callbacks/PluginCallbacks.h +++ b/zzz_generated/app-common/app-common/zap-generated/callbacks/PluginCallbacks.h @@ -217,8 +217,8 @@ void __attribute__((weak)) MatterIasWdPluginClientInitCallback() {} void MatterIasWdPluginServerInitCallback(); void __attribute__((weak)) MatterWakeOnLanPluginClientInitCallback() {} void MatterWakeOnLanPluginServerInitCallback(); -void __attribute__((weak)) MatterTvChannelPluginClientInitCallback() {} -void MatterTvChannelPluginServerInitCallback(); +void __attribute__((weak)) MatterChannelPluginClientInitCallback() {} +void MatterChannelPluginServerInitCallback(); void __attribute__((weak)) MatterTargetNavigatorPluginClientInitCallback() {} void MatterTargetNavigatorPluginServerInitCallback(); void __attribute__((weak)) MatterMediaPlaybackPluginClientInitCallback() {} diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-id.h b/zzz_generated/app-common/app-common/zap-generated/cluster-id.h index 11539caeb01ba5..a5808bc36e11f8 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-id.h @@ -319,8 +319,8 @@ static constexpr chip::ClusterId ZCL_IAS_WD_CLUSTER_ID = 0x0502; // Definitions for cluster: Wake on LAN static constexpr chip::ClusterId ZCL_WAKE_ON_LAN_CLUSTER_ID = 0x0503; -// Definitions for cluster: TV Channel -static constexpr chip::ClusterId ZCL_TV_CHANNEL_CLUSTER_ID = 0x0504; +// Definitions for cluster: Channel +static constexpr chip::ClusterId ZCL_CHANNEL_CLUSTER_ID = 0x0504; // Definitions for cluster: Target Navigator static constexpr chip::ClusterId ZCL_TARGET_NAVIGATOR_CLUSTER_ID = 0x0505; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 196fdca17012fb..273a248180a573 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -18884,9 +18884,9 @@ namespace Events { } // namespace Events } // namespace WakeOnLan -namespace TvChannel { +namespace Channel { namespace Structs { -namespace TvChannelInfo { +namespace ChannelInfo { CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; @@ -18937,8 +18937,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) return CHIP_NO_ERROR; } -} // namespace TvChannelInfo -namespace TvChannelLineupInfo { +} // namespace ChannelInfo +namespace ChannelLineupInfo { CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; @@ -18985,7 +18985,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) return CHIP_NO_ERROR; } -} // namespace TvChannelLineupInfo +} // namespace ChannelLineupInfo } // namespace Structs namespace Commands { @@ -19169,7 +19169,7 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { } // namespace Events -} // namespace TvChannel +} // namespace Channel namespace TargetNavigator { namespace Structs { namespace NavigateTargetTargetInfo { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 9db1340fbb4063..0fab6898fedfb5 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -29972,21 +29972,21 @@ struct TypeInfo }; } // namespace Attributes } // namespace WakeOnLan -namespace TvChannel { -// Enum for TvChannelErrorType -enum class TvChannelErrorType : uint8_t +namespace Channel { +// Enum for ChannelErrorType +enum class ChannelErrorType : uint8_t { kMultipleMatches = 0x00, kNoMatches = 0x01, }; -// Enum for TvChannelLineupInfoType -enum class TvChannelLineupInfoType : uint8_t +// Enum for ChannelLineupInfoType +enum class ChannelLineupInfoType : uint8_t { kMso = 0x00, }; namespace Structs { -namespace TvChannelInfo { +namespace ChannelInfo { enum class Fields { kMajorNumber = 1, @@ -30011,8 +30011,8 @@ struct Type using DecodableType = Type; -} // namespace TvChannelInfo -namespace TvChannelLineupInfo { +} // namespace ChannelInfo +namespace ChannelLineupInfo { enum class Fields { kOperatorName = 1, @@ -30027,7 +30027,7 @@ struct Type chip::CharSpan operatorName; chip::CharSpan lineupName; chip::CharSpan postalCode; - TvChannelLineupInfoType lineupInfoType; + ChannelLineupInfoType lineupInfoType; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -30035,7 +30035,7 @@ struct Type using DecodableType = Type; -} // namespace TvChannelLineupInfo +} // namespace ChannelLineupInfo } // namespace Structs namespace Commands { @@ -30075,13 +30075,13 @@ struct Type public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand static constexpr CommandId GetCommandId() { return Commands::ChangeChannel::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } chip::CharSpan match; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; - using ResponseType = Clusters::TvChannel::Commands::ChangeChannelResponse::DecodableType; + using ResponseType = Clusters::Channel::Commands::ChangeChannelResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -30090,7 +30090,7 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::ChangeChannel::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } chip::CharSpan match; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -30108,10 +30108,10 @@ struct Type public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand static constexpr CommandId GetCommandId() { return Commands::ChangeChannelResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } - Structs::TvChannelInfo::Type channelMatch; - TvChannelErrorType errorType; + Structs::ChannelInfo::Type channelMatch; + ChannelErrorType errorType; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -30124,10 +30124,10 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::ChangeChannelResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } - Structs::TvChannelInfo::DecodableType channelMatch; - TvChannelErrorType errorType; + Structs::ChannelInfo::DecodableType channelMatch; + ChannelErrorType errorType; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ChangeChannelResponse @@ -30143,7 +30143,7 @@ struct Type public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand static constexpr CommandId GetCommandId() { return Commands::ChangeChannelByNumber::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } uint16_t majorNumber; uint16_t minorNumber; @@ -30159,7 +30159,7 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::ChangeChannelByNumber::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } uint16_t majorNumber; uint16_t minorNumber; @@ -30177,7 +30177,7 @@ struct Type public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand static constexpr CommandId GetCommandId() { return Commands::SkipChannel::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } uint16_t count; @@ -30192,7 +30192,7 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::SkipChannel::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } uint16_t count; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -30205,13 +30205,12 @@ namespace Attributes { namespace ChannelList { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; using DecodableArgType = - const chip::app::DataModel::DecodableList &; + const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ChannelList::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -30219,11 +30218,11 @@ struct TypeInfo namespace ChannelLineup { struct TypeInfo { - using Type = chip::app::Clusters::TvChannel::Structs::TvChannelLineupInfo::Type; - using DecodableType = chip::app::Clusters::TvChannel::Structs::TvChannelLineupInfo::DecodableType; - using DecodableArgType = const chip::app::Clusters::TvChannel::Structs::TvChannelLineupInfo::DecodableType &; + using Type = chip::app::Clusters::Channel::Structs::ChannelLineupInfo::Type; + using DecodableType = chip::app::Clusters::Channel::Structs::ChannelLineupInfo::DecodableType; + using DecodableArgType = const chip::app::Clusters::Channel::Structs::ChannelLineupInfo::DecodableType &; - static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ChannelLineup::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -30231,11 +30230,11 @@ struct TypeInfo namespace CurrentChannel { struct TypeInfo { - using Type = chip::app::Clusters::TvChannel::Structs::TvChannelInfo::Type; - using DecodableType = chip::app::Clusters::TvChannel::Structs::TvChannelInfo::DecodableType; - using DecodableArgType = const chip::app::Clusters::TvChannel::Structs::TvChannelInfo::DecodableType &; + using Type = chip::app::Clusters::Channel::Structs::ChannelInfo::Type; + using DecodableType = chip::app::Clusters::Channel::Structs::ChannelInfo::DecodableType; + using DecodableArgType = const chip::app::Clusters::Channel::Structs::ChannelInfo::DecodableType &; - static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CurrentChannel::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -30247,7 +30246,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::DecodableList; using DecodableArgType = const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -30259,7 +30258,7 @@ struct TypeInfo using DecodableType = uint32_t; using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::FeatureMap::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -30271,7 +30270,7 @@ struct TypeInfo using DecodableType = uint16_t; using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ClusterRevision::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -30281,7 +30280,7 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); @@ -30294,7 +30293,7 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace TvChannel +} // namespace Channel namespace TargetNavigator { // Enum for NavigateTargetStatus enum class NavigateTargetStatus : uint8_t diff --git a/zzz_generated/app-common/app-common/zap-generated/command-id.h b/zzz_generated/app-common/app-common/zap-generated/command-id.h index c096f0292d914b..f401dffe72c0a6 100644 --- a/zzz_generated/app-common/app-common/zap-generated/command-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/command-id.h @@ -355,7 +355,7 @@ #define ZCL_START_WARNING_COMMAND_ID (0x00) #define ZCL_SQUAWK_COMMAND_ID (0x01) -// Commands for cluster: TV Channel +// Commands for cluster: Channel #define ZCL_CHANGE_CHANNEL_COMMAND_ID (0x00) #define ZCL_CHANGE_CHANNEL_RESPONSE_COMMAND_ID (0x00) #define ZCL_CHANGE_CHANNEL_BY_NUMBER_COMMAND_ID (0x01) diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 4f1e90becfd3b5..2c38c9934cd108 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -4785,7 +4785,7 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace WakeOnLan -namespace TvChannel { +namespace Channel { namespace Attributes { namespace ChannelList { @@ -4813,7 +4813,7 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace ClusterRevision } // namespace Attributes -} // namespace TvChannel +} // namespace Channel namespace TargetNavigator { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h index 311692b53d8be3..b7e174cbdb279f 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h @@ -322,9 +322,9 @@ static constexpr ClusterId Id = 0x00000502; namespace WakeOnLan { static constexpr ClusterId Id = 0x00000503; } // namespace WakeOnLan -namespace TvChannel { +namespace Channel { static constexpr ClusterId Id = 0x00000504; -} // namespace TvChannel +} // namespace Channel namespace TargetNavigator { static constexpr ClusterId Id = 0x00000505; } // namespace TargetNavigator diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index 8d1bf79c049ea4..857f9a96d14c7a 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -1253,7 +1253,7 @@ static constexpr CommandId Id = 0x00000001; } // namespace Commands } // namespace IasWd -namespace TvChannel { +namespace Channel { namespace Commands { namespace ChangeChannel { @@ -1273,7 +1273,7 @@ static constexpr CommandId Id = 0x00000002; } // namespace SkipChannel } // namespace Commands -} // namespace TvChannel +} // namespace Channel namespace TargetNavigator { namespace Commands { diff --git a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h index 7f08003e103c0e..d50a0d00c69ac3 100644 --- a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h +++ b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h @@ -690,10 +690,10 @@ #define CHIP_PRINTCLUSTER_WAKE_ON_LAN_CLUSTER #endif -#if defined(ZCL_USING_TV_CHANNEL_CLUSTER_SERVER) || defined(ZCL_USING_TV_CHANNEL_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_TV_CHANNEL_CLUSTER { ZCL_TV_CHANNEL_CLUSTER_ID, 1284, "TV Channel" }, +#if defined(ZCL_USING_CHANNEL_CLUSTER_SERVER) || defined(ZCL_USING_CHANNEL_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_CHANNEL_CLUSTER { ZCL_CHANNEL_CLUSTER_ID, 1284, "Channel" }, #else -#define CHIP_PRINTCLUSTER_TV_CHANNEL_CLUSTER +#define CHIP_PRINTCLUSTER_CHANNEL_CLUSTER #endif #if defined(ZCL_USING_TARGET_NAVIGATOR_CLUSTER_SERVER) || defined(ZCL_USING_TARGET_NAVIGATOR_CLUSTER_CLIENT) @@ -900,7 +900,7 @@ CHIP_PRINTCLUSTER_IAS_ACE_CLUSTER \ CHIP_PRINTCLUSTER_IAS_WD_CLUSTER \ CHIP_PRINTCLUSTER_WAKE_ON_LAN_CLUSTER \ - CHIP_PRINTCLUSTER_TV_CHANNEL_CLUSTER \ + CHIP_PRINTCLUSTER_CHANNEL_CLUSTER \ CHIP_PRINTCLUSTER_TARGET_NAVIGATOR_CLUSTER \ CHIP_PRINTCLUSTER_MEDIA_PLAYBACK_CLUSTER \ CHIP_PRINTCLUSTER_MEDIA_INPUT_CLUSTER \ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 2c3b863b1cf561..fae76a6d3c0d48 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -103,9 +103,9 @@ CHIP_ERROR LogValue(const char * label, size_t indent, CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::IasAce::Structs::IasAceZoneStatusResult::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::TvChannel::Structs::TvChannelInfo::DecodableType & value); + const chip::app::Clusters::Channel::Structs::ChannelInfo::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::TvChannel::Structs::TvChannelLineupInfo::DecodableType & value); + const chip::app::Clusters::Channel::Structs::ChannelLineupInfo::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::TargetNavigator::Structs::NavigateTargetTargetInfo::DecodableType & value); CHIP_ERROR LogValue(const char * label, size_t indent, @@ -1599,7 +1599,7 @@ CHIP_ERROR LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::TvChannel::Structs::TvChannelInfo::DecodableType & value) + const chip::app::Clusters::Channel::Structs::ChannelInfo::DecodableType & value) { ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); { @@ -1647,7 +1647,7 @@ CHIP_ERROR LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::TvChannel::Structs::TvChannelLineupInfo::DecodableType & value) + const chip::app::Clusters::Channel::Structs::ChannelLineupInfo::DecodableType & value) { ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); { @@ -2467,6 +2467,25 @@ static void OnApplicationLauncherStopAppResponseSuccess( command->SetCommandExitStatus(err); }; +static void +OnChannelChangeChannelResponseSuccess(void * context, + const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType & data) +{ + ChipLogProgress(Zcl, "Received ChangeChannelResponse:"); + CHIP_ERROR err = CHIP_NO_ERROR; + if (err == CHIP_NO_ERROR) + { + err = LogValue("channelMatch", 1, data.channelMatch); + } + if (err == CHIP_NO_ERROR) + { + err = LogValue("errorType", 1, data.errorType); + } + + ModelCommand * command = static_cast(context); + command->SetCommandExitStatus(err); +}; + static void OnContentLauncherLaunchContentResponseSuccess( void * context, const chip::app::Clusters::ContentLauncher::Commands::LaunchContentResponse::DecodableType & data) { @@ -3291,25 +3310,6 @@ static void OnScenesViewSceneResponseSuccess(void * context, command->SetCommandExitStatus(err); }; -static void -OnTvChannelChangeChannelResponseSuccess(void * context, - const chip::app::Clusters::TvChannel::Commands::ChangeChannelResponse::DecodableType & data) -{ - ChipLogProgress(Zcl, "Received ChangeChannelResponse:"); - CHIP_ERROR err = CHIP_NO_ERROR; - if (err == CHIP_NO_ERROR) - { - err = LogValue("channelMatch", 1, data.channelMatch); - } - if (err == CHIP_NO_ERROR) - { - err = LogValue("errorType", 1, data.errorType); - } - - ModelCommand * command = static_cast(context); - command->SetCommandExitStatus(err); -}; - static void OnTargetNavigatorNavigateTargetResponseSuccess( void * context, const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType & data) { @@ -3520,6 +3520,7 @@ static void OnThermostatGetWeeklyScheduleResponseSuccess( | BooleanState | 0x0045 | | BridgedActions | 0x0025 | | BridgedDeviceBasic | 0x0039 | +| Channel | 0x0504 | | ColorControl | 0x0300 | | ContentLauncher | 0x050A | | Descriptor | 0x001D | @@ -3556,7 +3557,6 @@ static void OnThermostatGetWeeklyScheduleResponseSuccess( | Scenes | 0x0005 | | SoftwareDiagnostics | 0x0034 | | Switch | 0x003B | -| TvChannel | 0x0504 | | TargetNavigator | 0x0505 | | TemperatureMeasurement | 0x0402 | | TestCluster | 0x050F | @@ -8800,6 +8800,268 @@ class ReportBridgedDeviceBasicClusterRevision : public ModelCommand bool mWait; }; +/*----------------------------------------------------------------------------*\ +| Cluster Channel | 0x0504 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeChannel | 0x00 | +| * ChangeChannelByNumber | 0x01 | +| * SkipChannel | 0x02 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * ChannelList | 0x0000 | +| * AttributeList | 0xFFFB | +| * ClusterRevision | 0xFFFD | +\*----------------------------------------------------------------------------*/ + +/* + * Command ChangeChannel + */ +class ChannelChangeChannel : public ModelCommand +{ +public: + ChannelChangeChannel() : ModelCommand("change-channel") + { + AddArgument("Match", &mRequest.match); + ModelCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000000) on endpoint %" PRIu8, endpointId); + + return chip::Controller::InvokeCommand(device, this, OnChannelChangeChannelResponseSuccess, OnDefaultFailure, endpointId, + mRequest, mTimedInteractionTimeoutMs); + } + +private: + chip::app::Clusters::Channel::Commands::ChangeChannel::Type mRequest; +}; + +/* + * Command ChangeChannelByNumber + */ +class ChannelChangeChannelByNumber : public ModelCommand +{ +public: + ChannelChangeChannelByNumber() : ModelCommand("change-channel-by-number") + { + AddArgument("MajorNumber", 0, UINT16_MAX, &mRequest.majorNumber); + AddArgument("MinorNumber", 0, UINT16_MAX, &mRequest.minorNumber); + ModelCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000001) on endpoint %" PRIu8, endpointId); + + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); + } + +private: + chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type mRequest; +}; + +/* + * Command SkipChannel + */ +class ChannelSkipChannel : public ModelCommand +{ +public: + ChannelSkipChannel() : ModelCommand("skip-channel") + { + AddArgument("Count", 0, UINT16_MAX, &mRequest.count); + ModelCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000002) on endpoint %" PRIu8, endpointId); + + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, + mTimedInteractionTimeoutMs); + } + +private: + chip::app::Clusters::Channel::Commands::SkipChannel::Type mRequest; +}; + +/* + * Attribute ChannelList + */ +class ReadChannelChannelList : public ModelCommand +{ +public: + ReadChannelChannelList() : ModelCommand("read") + { + AddArgument("attr-name", "channel-list"); + ModelCommand::AddArguments(); + } + + ~ReadChannelChannelList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0504) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::ChannelCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute(this, OnAttributeResponse, + OnDefaultFailure); + } + + static void OnAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "Channel.ChannelList response", value); + } +}; + +class ReportChannelChannelList : public ModelCommand +{ +public: + ReportChannelChannelList() : ModelCommand("report") + { + AddArgument("attr-name", "channel-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportChannelChannelList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0504) command (0x06) on endpoint %" PRIu8, endpointId); + + chip::Controller::ChannelCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport( + void * context, + const chip::app::DataModel::DecodableList & value) + { + LogValue("Channel.ChannelList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + +/* + * Attribute AttributeList + */ +class ReadChannelAttributeList : public ModelCommand +{ +public: + ReadChannelAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadChannelAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0504) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::ChannelCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute(this, OnAttributeResponse, + OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "Channel.AttributeList response", value); + } +}; + +/* + * Attribute ClusterRevision + */ +class ReadChannelClusterRevision : public ModelCommand +{ +public: + ReadChannelClusterRevision() : ModelCommand("read") + { + AddArgument("attr-name", "cluster-revision"); + ModelCommand::AddArguments(); + } + + ~ReadChannelClusterRevision() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0504) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::ChannelCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute(this, OnAttributeResponse, + OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, uint16_t value) + { + OnGeneralAttributeResponse(context, "Channel.ClusterRevision response", value); + } +}; + +class ReportChannelClusterRevision : public ModelCommand +{ +public: + ReportChannelClusterRevision() : ModelCommand("report") + { + AddArgument("attr-name", "cluster-revision"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportChannelClusterRevision() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0504) command (0x06) on endpoint %" PRIu8, endpointId); + + chip::Controller::ChannelCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint16_t value) { LogValue("Channel.ClusterRevision report", 0, value); } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /*----------------------------------------------------------------------------*\ | Cluster ColorControl | 0x0300 | |------------------------------------------------------------------------------| @@ -32196,268 +32458,6 @@ class ReportSwitchClusterRevision : public ModelCommand bool mWait; }; -/*----------------------------------------------------------------------------*\ -| Cluster TvChannel | 0x0504 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ChangeChannel | 0x00 | -| * ChangeChannelByNumber | 0x01 | -| * SkipChannel | 0x02 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ChannelList | 0x0000 | -| * AttributeList | 0xFFFB | -| * ClusterRevision | 0xFFFD | -\*----------------------------------------------------------------------------*/ - -/* - * Command ChangeChannel - */ -class TvChannelChangeChannel : public ModelCommand -{ -public: - TvChannelChangeChannel() : ModelCommand("change-channel") - { - AddArgument("Match", &mRequest.match); - ModelCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000000) on endpoint %" PRIu8, endpointId); - - return chip::Controller::InvokeCommand(device, this, OnTvChannelChangeChannelResponseSuccess, OnDefaultFailure, endpointId, - mRequest, mTimedInteractionTimeoutMs); - } - -private: - chip::app::Clusters::TvChannel::Commands::ChangeChannel::Type mRequest; -}; - -/* - * Command ChangeChannelByNumber - */ -class TvChannelChangeChannelByNumber : public ModelCommand -{ -public: - TvChannelChangeChannelByNumber() : ModelCommand("change-channel-by-number") - { - AddArgument("MajorNumber", 0, UINT16_MAX, &mRequest.majorNumber); - AddArgument("MinorNumber", 0, UINT16_MAX, &mRequest.minorNumber); - ModelCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000001) on endpoint %" PRIu8, endpointId); - - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, - mTimedInteractionTimeoutMs); - } - -private: - chip::app::Clusters::TvChannel::Commands::ChangeChannelByNumber::Type mRequest; -}; - -/* - * Command SkipChannel - */ -class TvChannelSkipChannel : public ModelCommand -{ -public: - TvChannelSkipChannel() : ModelCommand("skip-channel") - { - AddArgument("Count", 0, UINT16_MAX, &mRequest.count); - ModelCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000002) on endpoint %" PRIu8, endpointId); - - return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest, - mTimedInteractionTimeoutMs); - } - -private: - chip::app::Clusters::TvChannel::Commands::SkipChannel::Type mRequest; -}; - -/* - * Attribute ChannelList - */ -class ReadTvChannelChannelList : public ModelCommand -{ -public: - ReadTvChannelChannelList() : ModelCommand("read") - { - AddArgument("attr-name", "channel-list"); - ModelCommand::AddArguments(); - } - - ~ReadTvChannelChannelList() {} - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0504) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttribute(this, OnAttributeResponse, - OnDefaultFailure); - } - - static void OnAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList & value) - { - OnGeneralAttributeResponse(context, "TvChannel.ChannelList response", value); - } -}; - -class ReportTvChannelChannelList : public ModelCommand -{ -public: - ReportTvChannelChannelList() : ModelCommand("report") - { - AddArgument("attr-name", "channel-list"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportTvChannelChannelList() {} - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0504) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, endpointId); - - auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; - return cluster.SubscribeAttribute( - this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - - static void OnValueReport( - void * context, - const chip::app::DataModel::DecodableList & value) - { - LogValue("TvChannel.ChannelList report", 0, value); - } - -private: - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - -/* - * Attribute AttributeList - */ -class ReadTvChannelAttributeList : public ModelCommand -{ -public: - ReadTvChannelAttributeList() : ModelCommand("read") - { - AddArgument("attr-name", "attribute-list"); - ModelCommand::AddArguments(); - } - - ~ReadTvChannelAttributeList() {} - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0504) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttribute(this, OnAttributeResponse, - OnDefaultFailure); - } - - static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) - { - OnGeneralAttributeResponse(context, "TvChannel.AttributeList response", value); - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadTvChannelClusterRevision : public ModelCommand -{ -public: - ReadTvChannelClusterRevision() : ModelCommand("read") - { - AddArgument("attr-name", "cluster-revision"); - ModelCommand::AddArguments(); - } - - ~ReadTvChannelClusterRevision() {} - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0504) command (0x00) on endpoint %" PRIu8, endpointId); - - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, endpointId); - return cluster.ReadAttribute( - this, OnAttributeResponse, OnDefaultFailure); - } - - static void OnAttributeResponse(void * context, uint16_t value) - { - OnGeneralAttributeResponse(context, "TvChannel.ClusterRevision response", value); - } -}; - -class ReportTvChannelClusterRevision : public ModelCommand -{ -public: - ReportTvChannelClusterRevision() : ModelCommand("report") - { - AddArgument("attr-name", "cluster-revision"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportTvChannelClusterRevision() {} - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0504) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, endpointId); - - auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; - return cluster.SubscribeAttribute( - this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - - static void OnValueReport(void * context, uint16_t value) { LogValue("TvChannel.ClusterRevision report", 0, value); } - -private: - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - /*----------------------------------------------------------------------------*\ | Cluster TargetNavigator | 0x0505 | |------------------------------------------------------------------------------| @@ -51041,6 +51041,22 @@ void registerClusterBridgedDeviceBasic(Commands & commands) commands.Register(clusterName, clusterCommands); } +void registerClusterChannel(Commands & commands) +{ + const char * clusterName = "Channel"; + + commands_list clusterCommands = { + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + }; + + commands.Register(clusterName, clusterCommands); +} void registerClusterColorControl(Commands & commands) { const char * clusterName = "ColorControl"; @@ -52040,22 +52056,6 @@ void registerClusterSwitch(Commands & commands) commands.Register(clusterName, clusterCommands); } -void registerClusterTvChannel(Commands & commands) -{ - const char * clusterName = "TvChannel"; - - commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - }; - - commands.Register(clusterName, clusterCommands); -} void registerClusterTargetNavigator(Commands & commands) { const char * clusterName = "TargetNavigator"; @@ -52694,6 +52694,7 @@ void registerClusters(Commands & commands) registerClusterBooleanState(commands); registerClusterBridgedActions(commands); registerClusterBridgedDeviceBasic(commands); + registerClusterChannel(commands); registerClusterColorControl(commands); registerClusterContentLauncher(commands); registerClusterDescriptor(commands); @@ -52730,7 +52731,6 @@ void registerClusters(Commands & commands) registerClusterScenes(commands); registerClusterSoftwareDiagnostics(commands); registerClusterSwitch(commands); - registerClusterTvChannel(commands); registerClusterTargetNavigator(commands); registerClusterTemperatureMeasurement(commands); registerClusterTestCluster(commands); diff --git a/zzz_generated/chip-tool/zap-generated/reporting/Commands.h b/zzz_generated/chip-tool/zap-generated/reporting/Commands.h deleted file mode 100644 index 5077ca0a7c98e5..00000000000000 --- a/zzz_generated/chip-tool/zap-generated/reporting/Commands.h +++ /dev/null @@ -1,3500 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -#pragma once - -#include "../cluster/Commands.h" // For the LogValue bits and read callbacks -#include - -typedef void (*UnsupportedAttributeCallback)(void * context); - -class Listen : public ReportingCommand -{ -public: - Listen() : ReportingCommand("listen") {} - - ~Listen() - { - delete onReportAccountLoginClusterRevisionCallback; - delete onReportAdministratorCommissioningClusterRevisionCallback; - delete onReportApplicationBasicVendorNameCallback; - delete onReportApplicationBasicVendorIdCallback; - delete onReportApplicationBasicApplicationNameCallback; - delete onReportApplicationBasicProductIdCallback; - delete onReportApplicationBasicApplicationStatusCallback; - delete onReportApplicationBasicApplicationVersionCallback; - delete onReportApplicationBasicClusterRevisionCallback; - delete onReportApplicationLauncherClusterRevisionCallback; - delete onReportAudioOutputCurrentAudioOutputCallback; - delete onReportAudioOutputClusterRevisionCallback; - delete onReportBarrierControlBarrierMovingStateCallback; - delete onReportBarrierControlBarrierSafetyStatusCallback; - delete onReportBarrierControlBarrierCapabilitiesCallback; - delete onReportBarrierControlBarrierPositionCallback; - delete onReportBarrierControlClusterRevisionCallback; - delete onReportBasicInteractionModelVersionCallback; - delete onReportBasicVendorNameCallback; - delete onReportBasicVendorIDCallback; - delete onReportBasicProductNameCallback; - delete onReportBasicProductIDCallback; - delete onReportBasicNodeLabelCallback; - delete onReportBasicLocationCallback; - delete onReportBasicHardwareVersionCallback; - delete onReportBasicHardwareVersionStringCallback; - delete onReportBasicSoftwareVersionCallback; - delete onReportBasicSoftwareVersionStringCallback; - delete onReportBasicManufacturingDateCallback; - delete onReportBasicPartNumberCallback; - delete onReportBasicProductURLCallback; - delete onReportBasicProductLabelCallback; - delete onReportBasicSerialNumberCallback; - delete onReportBasicLocalConfigDisabledCallback; - delete onReportBasicReachableCallback; - delete onReportBasicClusterRevisionCallback; - delete onReportBinaryInputBasicOutOfServiceCallback; - delete onReportBinaryInputBasicPresentValueCallback; - delete onReportBinaryInputBasicStatusFlagsCallback; - delete onReportBinaryInputBasicClusterRevisionCallback; - delete onReportBindingClusterRevisionCallback; - delete onReportBooleanStateStateValueCallback; - delete onReportBooleanStateClusterRevisionCallback; - delete onReportBridgedActionsSetupUrlCallback; - delete onReportBridgedActionsClusterRevisionCallback; - delete onReportBridgedDeviceBasicClusterRevisionCallback; - delete onReportColorControlCurrentHueCallback; - delete onReportColorControlCurrentSaturationCallback; - delete onReportColorControlRemainingTimeCallback; - delete onReportColorControlCurrentXCallback; - delete onReportColorControlCurrentYCallback; - delete onReportColorControlDriftCompensationCallback; - delete onReportColorControlCompensationTextCallback; - delete onReportColorControlColorTemperatureCallback; - delete onReportColorControlColorModeCallback; - delete onReportColorControlColorControlOptionsCallback; - delete onReportColorControlNumberOfPrimariesCallback; - delete onReportColorControlPrimary1XCallback; - delete onReportColorControlPrimary1YCallback; - delete onReportColorControlPrimary1IntensityCallback; - delete onReportColorControlPrimary2XCallback; - delete onReportColorControlPrimary2YCallback; - delete onReportColorControlPrimary2IntensityCallback; - delete onReportColorControlPrimary3XCallback; - delete onReportColorControlPrimary3YCallback; - delete onReportColorControlPrimary3IntensityCallback; - delete onReportColorControlPrimary4XCallback; - delete onReportColorControlPrimary4YCallback; - delete onReportColorControlPrimary4IntensityCallback; - delete onReportColorControlPrimary5XCallback; - delete onReportColorControlPrimary5YCallback; - delete onReportColorControlPrimary5IntensityCallback; - delete onReportColorControlPrimary6XCallback; - delete onReportColorControlPrimary6YCallback; - delete onReportColorControlPrimary6IntensityCallback; - delete onReportColorControlWhitePointXCallback; - delete onReportColorControlWhitePointYCallback; - delete onReportColorControlColorPointRXCallback; - delete onReportColorControlColorPointRYCallback; - delete onReportColorControlColorPointRIntensityCallback; - delete onReportColorControlColorPointGXCallback; - delete onReportColorControlColorPointGYCallback; - delete onReportColorControlColorPointGIntensityCallback; - delete onReportColorControlColorPointBXCallback; - delete onReportColorControlColorPointBYCallback; - delete onReportColorControlColorPointBIntensityCallback; - delete onReportColorControlEnhancedCurrentHueCallback; - delete onReportColorControlEnhancedColorModeCallback; - delete onReportColorControlColorLoopActiveCallback; - delete onReportColorControlColorLoopDirectionCallback; - delete onReportColorControlColorLoopTimeCallback; - delete onReportColorControlColorLoopStartEnhancedHueCallback; - delete onReportColorControlColorLoopStoredEnhancedHueCallback; - delete onReportColorControlColorCapabilitiesCallback; - delete onReportColorControlColorTempPhysicalMinCallback; - delete onReportColorControlColorTempPhysicalMaxCallback; - delete onReportColorControlCoupleColorTempToLevelMinMiredsCallback; - delete onReportColorControlStartUpColorTemperatureMiredsCallback; - delete onReportColorControlClusterRevisionCallback; - delete onReportContentLauncherSupportedStreamingProtocolsCallback; - delete onReportContentLauncherClusterRevisionCallback; - delete onReportDescriptorClusterRevisionCallback; - delete onReportDoorLockLockStateCallback; - delete onReportDoorLockLockTypeCallback; - delete onReportDoorLockActuatorEnabledCallback; - delete onReportDoorLockDoorStateCallback; - delete onReportDoorLockLanguageCallback; - delete onReportDoorLockAutoRelockTimeCallback; - delete onReportDoorLockSoundVolumeCallback; - delete onReportDoorLockOperatingModeCallback; - delete onReportDoorLockEnableOneTouchLockingCallback; - delete onReportDoorLockEnablePrivacyModeButtonCallback; - delete onReportDoorLockWrongCodeEntryLimitCallback; - delete onReportDoorLockClusterRevisionCallback; - delete onReportElectricalMeasurementMeasurementTypeCallback; - delete onReportElectricalMeasurementTotalActivePowerCallback; - delete onReportElectricalMeasurementRmsVoltageCallback; - delete onReportElectricalMeasurementRmsVoltageMinCallback; - delete onReportElectricalMeasurementRmsVoltageMaxCallback; - delete onReportElectricalMeasurementRmsCurrentCallback; - delete onReportElectricalMeasurementRmsCurrentMinCallback; - delete onReportElectricalMeasurementRmsCurrentMaxCallback; - delete onReportElectricalMeasurementActivePowerCallback; - delete onReportElectricalMeasurementActivePowerMinCallback; - delete onReportElectricalMeasurementActivePowerMaxCallback; - delete onReportElectricalMeasurementClusterRevisionCallback; - delete onReportEthernetNetworkDiagnosticsPHYRateCallback; - delete onReportEthernetNetworkDiagnosticsFullDuplexCallback; - delete onReportEthernetNetworkDiagnosticsPacketRxCountCallback; - delete onReportEthernetNetworkDiagnosticsPacketTxCountCallback; - delete onReportEthernetNetworkDiagnosticsTxErrCountCallback; - delete onReportEthernetNetworkDiagnosticsCollisionCountCallback; - delete onReportEthernetNetworkDiagnosticsOverrunCountCallback; - delete onReportEthernetNetworkDiagnosticsCarrierDetectCallback; - delete onReportEthernetNetworkDiagnosticsTimeSinceResetCallback; - delete onReportEthernetNetworkDiagnosticsClusterRevisionCallback; - delete onReportFixedLabelClusterRevisionCallback; - delete onReportFlowMeasurementMeasuredValueCallback; - delete onReportFlowMeasurementMinMeasuredValueCallback; - delete onReportFlowMeasurementMaxMeasuredValueCallback; - delete onReportFlowMeasurementToleranceCallback; - delete onReportFlowMeasurementClusterRevisionCallback; - delete onReportGeneralCommissioningBreadcrumbCallback; - delete onReportGeneralCommissioningClusterRevisionCallback; - delete onReportGeneralDiagnosticsRebootCountCallback; - delete onReportGeneralDiagnosticsUpTimeCallback; - delete onReportGeneralDiagnosticsTotalOperationalHoursCallback; - delete onReportGeneralDiagnosticsBootReasonsCallback; - delete onReportGeneralDiagnosticsClusterRevisionCallback; - delete onReportGroupKeyManagementClusterRevisionCallback; - delete onReportGroupsNameSupportCallback; - delete onReportGroupsClusterRevisionCallback; - delete onReportIdentifyIdentifyTimeCallback; - delete onReportIdentifyIdentifyTypeCallback; - delete onReportIdentifyClusterRevisionCallback; - delete onReportIlluminanceMeasurementMeasuredValueCallback; - delete onReportIlluminanceMeasurementMinMeasuredValueCallback; - delete onReportIlluminanceMeasurementMaxMeasuredValueCallback; - delete onReportIlluminanceMeasurementToleranceCallback; - delete onReportIlluminanceMeasurementLightSensorTypeCallback; - delete onReportIlluminanceMeasurementClusterRevisionCallback; - delete onReportKeypadInputClusterRevisionCallback; - delete onReportLevelControlCurrentLevelCallback; - delete onReportLevelControlRemainingTimeCallback; - delete onReportLevelControlMinLevelCallback; - delete onReportLevelControlMaxLevelCallback; - delete onReportLevelControlCurrentFrequencyCallback; - delete onReportLevelControlMinFrequencyCallback; - delete onReportLevelControlMaxFrequencyCallback; - delete onReportLevelControlOptionsCallback; - delete onReportLevelControlOnOffTransitionTimeCallback; - delete onReportLevelControlOnLevelCallback; - delete onReportLevelControlOnTransitionTimeCallback; - delete onReportLevelControlOffTransitionTimeCallback; - delete onReportLevelControlDefaultMoveRateCallback; - delete onReportLevelControlStartUpCurrentLevelCallback; - delete onReportLevelControlClusterRevisionCallback; - delete onReportLowPowerClusterRevisionCallback; - delete onReportMediaInputCurrentMediaInputCallback; - delete onReportMediaInputClusterRevisionCallback; - delete onReportMediaPlaybackPlaybackStateCallback; - delete onReportMediaPlaybackStartTimeCallback; - delete onReportMediaPlaybackDurationCallback; - delete onReportMediaPlaybackSeekRangeEndCallback; - delete onReportMediaPlaybackSeekRangeStartCallback; - delete onReportMediaPlaybackClusterRevisionCallback; - delete onReportModeSelectCurrentModeCallback; - delete onReportModeSelectOnModeCallback; - delete onReportModeSelectStartUpModeCallback; - delete onReportModeSelectDescriptionCallback; - delete onReportModeSelectClusterRevisionCallback; - delete onReportNetworkCommissioningFeatureMapCallback; - delete onReportNetworkCommissioningClusterRevisionCallback; - delete onReportOtaSoftwareUpdateProviderClusterRevisionCallback; - delete onReportOtaSoftwareUpdateRequestorDefaultOtaProviderCallback; - delete onReportOtaSoftwareUpdateRequestorUpdatePossibleCallback; - delete onReportOtaSoftwareUpdateRequestorClusterRevisionCallback; - delete onReportOccupancySensingOccupancyCallback; - delete onReportOccupancySensingOccupancySensorTypeCallback; - delete onReportOccupancySensingOccupancySensorTypeBitmapCallback; - delete onReportOccupancySensingClusterRevisionCallback; - delete onReportOnOffOnOffCallback; - delete onReportOnOffGlobalSceneControlCallback; - delete onReportOnOffOnTimeCallback; - delete onReportOnOffOffWaitTimeCallback; - delete onReportOnOffStartUpOnOffCallback; - delete onReportOnOffFeatureMapCallback; - delete onReportOnOffClusterRevisionCallback; - delete onReportOnOffSwitchConfigurationSwitchTypeCallback; - delete onReportOnOffSwitchConfigurationSwitchActionsCallback; - delete onReportOnOffSwitchConfigurationClusterRevisionCallback; - delete onReportOperationalCredentialsSupportedFabricsCallback; - delete onReportOperationalCredentialsCommissionedFabricsCallback; - delete onReportOperationalCredentialsCurrentFabricIndexCallback; - delete onReportOperationalCredentialsClusterRevisionCallback; - delete onReportPowerSourceStatusCallback; - delete onReportPowerSourceOrderCallback; - delete onReportPowerSourceDescriptionCallback; - delete onReportPowerSourceBatteryVoltageCallback; - delete onReportPowerSourceBatteryPercentRemainingCallback; - delete onReportPowerSourceBatteryTimeRemainingCallback; - delete onReportPowerSourceBatteryChargeLevelCallback; - delete onReportPowerSourceBatteryChargeStateCallback; - delete onReportPowerSourceFeatureMapCallback; - delete onReportPowerSourceClusterRevisionCallback; - delete onReportPressureMeasurementMeasuredValueCallback; - delete onReportPressureMeasurementMinMeasuredValueCallback; - delete onReportPressureMeasurementMaxMeasuredValueCallback; - delete onReportPressureMeasurementClusterRevisionCallback; - delete onReportPumpConfigurationAndControlMaxPressureCallback; - delete onReportPumpConfigurationAndControlMaxSpeedCallback; - delete onReportPumpConfigurationAndControlMaxFlowCallback; - delete onReportPumpConfigurationAndControlMinConstPressureCallback; - delete onReportPumpConfigurationAndControlMaxConstPressureCallback; - delete onReportPumpConfigurationAndControlMinCompPressureCallback; - delete onReportPumpConfigurationAndControlMaxCompPressureCallback; - delete onReportPumpConfigurationAndControlMinConstSpeedCallback; - delete onReportPumpConfigurationAndControlMaxConstSpeedCallback; - delete onReportPumpConfigurationAndControlMinConstFlowCallback; - delete onReportPumpConfigurationAndControlMaxConstFlowCallback; - delete onReportPumpConfigurationAndControlMinConstTempCallback; - delete onReportPumpConfigurationAndControlMaxConstTempCallback; - delete onReportPumpConfigurationAndControlPumpStatusCallback; - delete onReportPumpConfigurationAndControlEffectiveOperationModeCallback; - delete onReportPumpConfigurationAndControlEffectiveControlModeCallback; - delete onReportPumpConfigurationAndControlCapacityCallback; - delete onReportPumpConfigurationAndControlSpeedCallback; - delete onReportPumpConfigurationAndControlLifetimeRunningHoursCallback; - delete onReportPumpConfigurationAndControlPowerCallback; - delete onReportPumpConfigurationAndControlLifetimeEnergyConsumedCallback; - delete onReportPumpConfigurationAndControlOperationModeCallback; - delete onReportPumpConfigurationAndControlControlModeCallback; - delete onReportPumpConfigurationAndControlAlarmMaskCallback; - delete onReportPumpConfigurationAndControlFeatureMapCallback; - delete onReportPumpConfigurationAndControlClusterRevisionCallback; - delete onReportRelativeHumidityMeasurementMeasuredValueCallback; - delete onReportRelativeHumidityMeasurementMinMeasuredValueCallback; - delete onReportRelativeHumidityMeasurementMaxMeasuredValueCallback; - delete onReportRelativeHumidityMeasurementToleranceCallback; - delete onReportRelativeHumidityMeasurementClusterRevisionCallback; - delete onReportScenesSceneCountCallback; - delete onReportScenesCurrentSceneCallback; - delete onReportScenesCurrentGroupCallback; - delete onReportScenesSceneValidCallback; - delete onReportScenesNameSupportCallback; - delete onReportScenesClusterRevisionCallback; - delete onReportSoftwareDiagnosticsCurrentHeapFreeCallback; - delete onReportSoftwareDiagnosticsCurrentHeapUsedCallback; - delete onReportSoftwareDiagnosticsCurrentHeapHighWatermarkCallback; - delete onReportSoftwareDiagnosticsClusterRevisionCallback; - delete onReportSwitchNumberOfPositionsCallback; - delete onReportSwitchCurrentPositionCallback; - delete onReportSwitchMultiPressMaxCallback; - delete onReportSwitchFeatureMapCallback; - delete onReportSwitchClusterRevisionCallback; - delete onReportTvChannelClusterRevisionCallback; - delete onReportTargetNavigatorClusterRevisionCallback; - delete onReportTemperatureMeasurementMeasuredValueCallback; - delete onReportTemperatureMeasurementMinMeasuredValueCallback; - delete onReportTemperatureMeasurementMaxMeasuredValueCallback; - delete onReportTemperatureMeasurementToleranceCallback; - delete onReportTemperatureMeasurementClusterRevisionCallback; - delete onReportTestClusterBooleanCallback; - delete onReportTestClusterBitmap8Callback; - delete onReportTestClusterBitmap16Callback; - delete onReportTestClusterBitmap32Callback; - delete onReportTestClusterBitmap64Callback; - delete onReportTestClusterInt8uCallback; - delete onReportTestClusterInt16uCallback; - delete onReportTestClusterInt24uCallback; - delete onReportTestClusterInt32uCallback; - delete onReportTestClusterInt40uCallback; - delete onReportTestClusterInt48uCallback; - delete onReportTestClusterInt56uCallback; - delete onReportTestClusterInt64uCallback; - delete onReportTestClusterInt8sCallback; - delete onReportTestClusterInt16sCallback; - delete onReportTestClusterInt24sCallback; - delete onReportTestClusterInt32sCallback; - delete onReportTestClusterInt40sCallback; - delete onReportTestClusterInt48sCallback; - delete onReportTestClusterInt56sCallback; - delete onReportTestClusterInt64sCallback; - delete onReportTestClusterEnum8Callback; - delete onReportTestClusterEnum16Callback; - delete onReportTestClusterFloatSingleCallback; - delete onReportTestClusterFloatDoubleCallback; - delete onReportTestClusterOctetStringCallback; - delete onReportTestClusterLongOctetStringCallback; - delete onReportTestClusterCharStringCallback; - delete onReportTestClusterLongCharStringCallback; - delete onReportTestClusterEpochUsCallback; - delete onReportTestClusterEpochSCallback; - delete onReportTestClusterVendorIdCallback; - delete onReportTestClusterEnumAttrCallback; - delete onReportTestClusterRangeRestrictedInt8uCallback; - delete onReportTestClusterRangeRestrictedInt8sCallback; - delete onReportTestClusterRangeRestrictedInt16uCallback; - delete onReportTestClusterRangeRestrictedInt16sCallback; - delete onReportTestClusterUnsupportedCallback; - delete onReportTestClusterNullableBooleanCallback; - delete onReportTestClusterNullableBitmap8Callback; - delete onReportTestClusterNullableBitmap16Callback; - delete onReportTestClusterNullableBitmap32Callback; - delete onReportTestClusterNullableBitmap64Callback; - delete onReportTestClusterNullableInt8uCallback; - delete onReportTestClusterNullableInt16uCallback; - delete onReportTestClusterNullableInt24uCallback; - delete onReportTestClusterNullableInt32uCallback; - delete onReportTestClusterNullableInt40uCallback; - delete onReportTestClusterNullableInt48uCallback; - delete onReportTestClusterNullableInt56uCallback; - delete onReportTestClusterNullableInt64uCallback; - delete onReportTestClusterNullableInt8sCallback; - delete onReportTestClusterNullableInt16sCallback; - delete onReportTestClusterNullableInt24sCallback; - delete onReportTestClusterNullableInt32sCallback; - delete onReportTestClusterNullableInt40sCallback; - delete onReportTestClusterNullableInt48sCallback; - delete onReportTestClusterNullableInt56sCallback; - delete onReportTestClusterNullableInt64sCallback; - delete onReportTestClusterNullableEnum8Callback; - delete onReportTestClusterNullableEnum16Callback; - delete onReportTestClusterNullableFloatSingleCallback; - delete onReportTestClusterNullableFloatDoubleCallback; - delete onReportTestClusterNullableOctetStringCallback; - delete onReportTestClusterNullableCharStringCallback; - delete onReportTestClusterNullableEnumAttrCallback; - delete onReportTestClusterNullableRangeRestrictedInt8uCallback; - delete onReportTestClusterNullableRangeRestrictedInt8sCallback; - delete onReportTestClusterNullableRangeRestrictedInt16uCallback; - delete onReportTestClusterNullableRangeRestrictedInt16sCallback; - delete onReportTestClusterClusterRevisionCallback; - delete onReportThermostatLocalTemperatureCallback; - delete onReportThermostatAbsMinHeatSetpointLimitCallback; - delete onReportThermostatAbsMaxHeatSetpointLimitCallback; - delete onReportThermostatAbsMinCoolSetpointLimitCallback; - delete onReportThermostatAbsMaxCoolSetpointLimitCallback; - delete onReportThermostatOccupiedCoolingSetpointCallback; - delete onReportThermostatOccupiedHeatingSetpointCallback; - delete onReportThermostatMinHeatSetpointLimitCallback; - delete onReportThermostatMaxHeatSetpointLimitCallback; - delete onReportThermostatMinCoolSetpointLimitCallback; - delete onReportThermostatMaxCoolSetpointLimitCallback; - delete onReportThermostatMinSetpointDeadBandCallback; - delete onReportThermostatControlSequenceOfOperationCallback; - delete onReportThermostatSystemModeCallback; - delete onReportThermostatStartOfWeekCallback; - delete onReportThermostatNumberOfWeeklyTransitionsCallback; - delete onReportThermostatNumberOfDailyTransitionsCallback; - delete onReportThermostatFeatureMapCallback; - delete onReportThermostatClusterRevisionCallback; - delete onReportThermostatUserInterfaceConfigurationTemperatureDisplayModeCallback; - delete onReportThermostatUserInterfaceConfigurationKeypadLockoutCallback; - delete onReportThermostatUserInterfaceConfigurationScheduleProgrammingVisibilityCallback; - delete onReportThermostatUserInterfaceConfigurationClusterRevisionCallback; - delete onReportThreadNetworkDiagnosticsChannelCallback; - delete onReportThreadNetworkDiagnosticsRoutingRoleCallback; - delete onReportThreadNetworkDiagnosticsNetworkNameCallback; - delete onReportThreadNetworkDiagnosticsPanIdCallback; - delete onReportThreadNetworkDiagnosticsExtendedPanIdCallback; - delete onReportThreadNetworkDiagnosticsMeshLocalPrefixCallback; - delete onReportThreadNetworkDiagnosticsOverrunCountCallback; - delete onReportThreadNetworkDiagnosticsPartitionIdCallback; - delete onReportThreadNetworkDiagnosticsWeightingCallback; - delete onReportThreadNetworkDiagnosticsDataVersionCallback; - delete onReportThreadNetworkDiagnosticsStableDataVersionCallback; - delete onReportThreadNetworkDiagnosticsLeaderRouterIdCallback; - delete onReportThreadNetworkDiagnosticsDetachedRoleCountCallback; - delete onReportThreadNetworkDiagnosticsChildRoleCountCallback; - delete onReportThreadNetworkDiagnosticsRouterRoleCountCallback; - delete onReportThreadNetworkDiagnosticsLeaderRoleCountCallback; - delete onReportThreadNetworkDiagnosticsAttachAttemptCountCallback; - delete onReportThreadNetworkDiagnosticsPartitionIdChangeCountCallback; - delete onReportThreadNetworkDiagnosticsBetterPartitionAttachAttemptCountCallback; - delete onReportThreadNetworkDiagnosticsParentChangeCountCallback; - delete onReportThreadNetworkDiagnosticsTxTotalCountCallback; - delete onReportThreadNetworkDiagnosticsTxUnicastCountCallback; - delete onReportThreadNetworkDiagnosticsTxBroadcastCountCallback; - delete onReportThreadNetworkDiagnosticsTxAckRequestedCountCallback; - delete onReportThreadNetworkDiagnosticsTxAckedCountCallback; - delete onReportThreadNetworkDiagnosticsTxNoAckRequestedCountCallback; - delete onReportThreadNetworkDiagnosticsTxDataCountCallback; - delete onReportThreadNetworkDiagnosticsTxDataPollCountCallback; - delete onReportThreadNetworkDiagnosticsTxBeaconCountCallback; - delete onReportThreadNetworkDiagnosticsTxBeaconRequestCountCallback; - delete onReportThreadNetworkDiagnosticsTxOtherCountCallback; - delete onReportThreadNetworkDiagnosticsTxRetryCountCallback; - delete onReportThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCountCallback; - delete onReportThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCountCallback; - delete onReportThreadNetworkDiagnosticsTxErrCcaCountCallback; - delete onReportThreadNetworkDiagnosticsTxErrAbortCountCallback; - delete onReportThreadNetworkDiagnosticsTxErrBusyChannelCountCallback; - delete onReportThreadNetworkDiagnosticsRxTotalCountCallback; - delete onReportThreadNetworkDiagnosticsRxUnicastCountCallback; - delete onReportThreadNetworkDiagnosticsRxBroadcastCountCallback; - delete onReportThreadNetworkDiagnosticsRxDataCountCallback; - delete onReportThreadNetworkDiagnosticsRxDataPollCountCallback; - delete onReportThreadNetworkDiagnosticsRxBeaconCountCallback; - delete onReportThreadNetworkDiagnosticsRxBeaconRequestCountCallback; - delete onReportThreadNetworkDiagnosticsRxOtherCountCallback; - delete onReportThreadNetworkDiagnosticsRxAddressFilteredCountCallback; - delete onReportThreadNetworkDiagnosticsRxDestAddrFilteredCountCallback; - delete onReportThreadNetworkDiagnosticsRxDuplicatedCountCallback; - delete onReportThreadNetworkDiagnosticsRxErrNoFrameCountCallback; - delete onReportThreadNetworkDiagnosticsRxErrUnknownNeighborCountCallback; - delete onReportThreadNetworkDiagnosticsRxErrInvalidSrcAddrCountCallback; - delete onReportThreadNetworkDiagnosticsRxErrSecCountCallback; - delete onReportThreadNetworkDiagnosticsRxErrFcsCountCallback; - delete onReportThreadNetworkDiagnosticsRxErrOtherCountCallback; - delete onReportThreadNetworkDiagnosticsActiveTimestampCallback; - delete onReportThreadNetworkDiagnosticsPendingTimestampCallback; - delete onReportThreadNetworkDiagnosticsDelayCallback; - delete onReportThreadNetworkDiagnosticsChannelMaskCallback; - delete onReportThreadNetworkDiagnosticsClusterRevisionCallback; - delete onReportWakeOnLanWakeOnLanMacAddressCallback; - delete onReportWakeOnLanClusterRevisionCallback; - delete onReportWiFiNetworkDiagnosticsBssidCallback; - delete onReportWiFiNetworkDiagnosticsSecurityTypeCallback; - delete onReportWiFiNetworkDiagnosticsWiFiVersionCallback; - delete onReportWiFiNetworkDiagnosticsChannelNumberCallback; - delete onReportWiFiNetworkDiagnosticsRssiCallback; - delete onReportWiFiNetworkDiagnosticsBeaconLostCountCallback; - delete onReportWiFiNetworkDiagnosticsBeaconRxCountCallback; - delete onReportWiFiNetworkDiagnosticsPacketMulticastRxCountCallback; - delete onReportWiFiNetworkDiagnosticsPacketMulticastTxCountCallback; - delete onReportWiFiNetworkDiagnosticsPacketUnicastRxCountCallback; - delete onReportWiFiNetworkDiagnosticsPacketUnicastTxCountCallback; - delete onReportWiFiNetworkDiagnosticsCurrentMaxRateCallback; - delete onReportWiFiNetworkDiagnosticsOverrunCountCallback; - delete onReportWiFiNetworkDiagnosticsClusterRevisionCallback; - delete onReportWindowCoveringTypeCallback; - delete onReportWindowCoveringCurrentPositionLiftCallback; - delete onReportWindowCoveringCurrentPositionTiltCallback; - delete onReportWindowCoveringConfigStatusCallback; - delete onReportWindowCoveringCurrentPositionLiftPercentageCallback; - delete onReportWindowCoveringCurrentPositionTiltPercentageCallback; - delete onReportWindowCoveringOperationalStatusCallback; - delete onReportWindowCoveringTargetPositionLiftPercent100thsCallback; - delete onReportWindowCoveringTargetPositionTiltPercent100thsCallback; - delete onReportWindowCoveringEndProductTypeCallback; - delete onReportWindowCoveringCurrentPositionLiftPercent100thsCallback; - delete onReportWindowCoveringCurrentPositionTiltPercent100thsCallback; - delete onReportWindowCoveringInstalledOpenLimitLiftCallback; - delete onReportWindowCoveringInstalledClosedLimitLiftCallback; - delete onReportWindowCoveringInstalledOpenLimitTiltCallback; - delete onReportWindowCoveringInstalledClosedLimitTiltCallback; - delete onReportWindowCoveringModeCallback; - delete onReportWindowCoveringSafetyStatusCallback; - delete onReportWindowCoveringFeatureMapCallback; - delete onReportWindowCoveringClusterRevisionCallback; - } - - void AddReportCallbacks(NodeId remoteId, uint8_t endpointId) override - { - chip::app::CHIPDeviceCallbacksMgr & callbacksMgr = chip::app::CHIPDeviceCallbacksMgr::GetInstance(); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050E, 0xFFFD, onReportAccountLoginClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003C, 0xFFFD, - onReportAdministratorCommissioningClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050D, 0x0000, onReportApplicationBasicVendorNameCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050D, 0x0001, onReportApplicationBasicVendorIdCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050D, 0x0002, - onReportApplicationBasicApplicationNameCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050D, 0x0003, onReportApplicationBasicProductIdCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050D, 0x0005, - onReportApplicationBasicApplicationStatusCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050D, 0x0006, - onReportApplicationBasicApplicationVersionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050D, 0xFFFD, - onReportApplicationBasicClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050C, 0xFFFD, - onReportApplicationLauncherClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050B, 0x0001, - onReportAudioOutputCurrentAudioOutputCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050B, 0xFFFD, onReportAudioOutputClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0103, 0x0001, - onReportBarrierControlBarrierMovingStateCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0103, 0x0002, - onReportBarrierControlBarrierSafetyStatusCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0103, 0x0003, - onReportBarrierControlBarrierCapabilitiesCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0103, 0x000A, - onReportBarrierControlBarrierPositionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0103, 0xFFFD, - onReportBarrierControlClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0000, onReportBasicInteractionModelVersionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0001, onReportBasicVendorNameCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0002, onReportBasicVendorIDCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0003, onReportBasicProductNameCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0004, onReportBasicProductIDCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0005, onReportBasicNodeLabelCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0006, onReportBasicLocationCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0007, onReportBasicHardwareVersionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0008, onReportBasicHardwareVersionStringCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0009, onReportBasicSoftwareVersionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x000A, onReportBasicSoftwareVersionStringCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x000B, onReportBasicManufacturingDateCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x000C, onReportBasicPartNumberCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x000D, onReportBasicProductURLCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x000E, onReportBasicProductLabelCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x000F, onReportBasicSerialNumberCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0010, onReportBasicLocalConfigDisabledCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0011, onReportBasicReachableCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0xFFFD, onReportBasicClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x000F, 0x0051, onReportBinaryInputBasicOutOfServiceCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x000F, 0x0055, onReportBinaryInputBasicPresentValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x000F, 0x006F, onReportBinaryInputBasicStatusFlagsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x000F, 0xFFFD, - onReportBinaryInputBasicClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x001E, 0xFFFD, onReportBindingClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0045, 0x0000, onReportBooleanStateStateValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0045, 0xFFFD, onReportBooleanStateClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0025, 0x0002, onReportBridgedActionsSetupUrlCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0025, 0xFFFD, - onReportBridgedActionsClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0039, 0xFFFD, - onReportBridgedDeviceBasicClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0000, onReportColorControlCurrentHueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0001, - onReportColorControlCurrentSaturationCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0002, onReportColorControlRemainingTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0003, onReportColorControlCurrentXCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0004, onReportColorControlCurrentYCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0005, - onReportColorControlDriftCompensationCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0006, onReportColorControlCompensationTextCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0007, onReportColorControlColorTemperatureCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0008, onReportColorControlColorModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x000F, - onReportColorControlColorControlOptionsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0010, - onReportColorControlNumberOfPrimariesCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0011, onReportColorControlPrimary1XCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0012, onReportColorControlPrimary1YCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0013, - onReportColorControlPrimary1IntensityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0015, onReportColorControlPrimary2XCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0016, onReportColorControlPrimary2YCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0017, - onReportColorControlPrimary2IntensityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0019, onReportColorControlPrimary3XCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x001A, onReportColorControlPrimary3YCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x001B, - onReportColorControlPrimary3IntensityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0020, onReportColorControlPrimary4XCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0021, onReportColorControlPrimary4YCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0022, - onReportColorControlPrimary4IntensityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0024, onReportColorControlPrimary5XCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0025, onReportColorControlPrimary5YCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0026, - onReportColorControlPrimary5IntensityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0028, onReportColorControlPrimary6XCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0029, onReportColorControlPrimary6YCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x002A, - onReportColorControlPrimary6IntensityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0030, onReportColorControlWhitePointXCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0031, onReportColorControlWhitePointYCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0032, onReportColorControlColorPointRXCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0033, onReportColorControlColorPointRYCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0034, - onReportColorControlColorPointRIntensityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0036, onReportColorControlColorPointGXCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0037, onReportColorControlColorPointGYCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0038, - onReportColorControlColorPointGIntensityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x003A, onReportColorControlColorPointBXCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x003B, onReportColorControlColorPointBYCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x003C, - onReportColorControlColorPointBIntensityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x4000, - onReportColorControlEnhancedCurrentHueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x4001, - onReportColorControlEnhancedColorModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x4002, onReportColorControlColorLoopActiveCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x4003, - onReportColorControlColorLoopDirectionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x4004, onReportColorControlColorLoopTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x4005, - onReportColorControlColorLoopStartEnhancedHueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x4006, - onReportColorControlColorLoopStoredEnhancedHueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x400A, - onReportColorControlColorCapabilitiesCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x400B, - onReportColorControlColorTempPhysicalMinCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x400C, - onReportColorControlColorTempPhysicalMaxCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x400D, - onReportColorControlCoupleColorTempToLevelMinMiredsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x4010, - onReportColorControlStartUpColorTemperatureMiredsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0xFFFD, onReportColorControlClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050A, 0x0001, - onReportContentLauncherSupportedStreamingProtocolsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050A, 0xFFFD, - onReportContentLauncherClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x001D, 0xFFFD, onReportDescriptorClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x0000, onReportDoorLockLockStateCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x0001, onReportDoorLockLockTypeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x0002, onReportDoorLockActuatorEnabledCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x0003, onReportDoorLockDoorStateCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x0021, onReportDoorLockLanguageCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x0023, onReportDoorLockAutoRelockTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x0024, onReportDoorLockSoundVolumeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x0025, onReportDoorLockOperatingModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x0029, - onReportDoorLockEnableOneTouchLockingCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x002B, - onReportDoorLockEnablePrivacyModeButtonCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x0030, onReportDoorLockWrongCodeEntryLimitCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0xFFFD, onReportDoorLockClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x0000, - onReportElectricalMeasurementMeasurementTypeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x0304, - onReportElectricalMeasurementTotalActivePowerCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x0505, - onReportElectricalMeasurementRmsVoltageCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x0506, - onReportElectricalMeasurementRmsVoltageMinCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x0507, - onReportElectricalMeasurementRmsVoltageMaxCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x0508, - onReportElectricalMeasurementRmsCurrentCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x0509, - onReportElectricalMeasurementRmsCurrentMinCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x050A, - onReportElectricalMeasurementRmsCurrentMaxCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x050B, - onReportElectricalMeasurementActivePowerCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x050C, - onReportElectricalMeasurementActivePowerMinCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x050D, - onReportElectricalMeasurementActivePowerMaxCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0xFFFD, - onReportElectricalMeasurementClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0037, 0x0000, - onReportEthernetNetworkDiagnosticsPHYRateCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0037, 0x0001, - onReportEthernetNetworkDiagnosticsFullDuplexCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0037, 0x0002, - onReportEthernetNetworkDiagnosticsPacketRxCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0037, 0x0003, - onReportEthernetNetworkDiagnosticsPacketTxCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0037, 0x0004, - onReportEthernetNetworkDiagnosticsTxErrCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0037, 0x0005, - onReportEthernetNetworkDiagnosticsCollisionCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0037, 0x0006, - onReportEthernetNetworkDiagnosticsOverrunCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0037, 0x0007, - onReportEthernetNetworkDiagnosticsCarrierDetectCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0037, 0x0008, - onReportEthernetNetworkDiagnosticsTimeSinceResetCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0037, 0xFFFD, - onReportEthernetNetworkDiagnosticsClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0040, 0xFFFD, onReportFixedLabelClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0404, 0x0000, onReportFlowMeasurementMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0404, 0x0001, - onReportFlowMeasurementMinMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0404, 0x0002, - onReportFlowMeasurementMaxMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0404, 0x0003, onReportFlowMeasurementToleranceCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0404, 0xFFFD, - onReportFlowMeasurementClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0030, 0x0000, - onReportGeneralCommissioningBreadcrumbCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0030, 0xFFFD, - onReportGeneralCommissioningClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0033, 0x0001, - onReportGeneralDiagnosticsRebootCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0033, 0x0002, onReportGeneralDiagnosticsUpTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0033, 0x0003, - onReportGeneralDiagnosticsTotalOperationalHoursCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0033, 0x0004, - onReportGeneralDiagnosticsBootReasonsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0033, 0xFFFD, - onReportGeneralDiagnosticsClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003F, 0xFFFD, - onReportGroupKeyManagementClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0004, 0x0000, onReportGroupsNameSupportCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0004, 0xFFFD, onReportGroupsClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0003, 0x0000, onReportIdentifyIdentifyTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0003, 0x0001, onReportIdentifyIdentifyTypeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0003, 0xFFFD, onReportIdentifyClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0400, 0x0000, - onReportIlluminanceMeasurementMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0400, 0x0001, - onReportIlluminanceMeasurementMinMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0400, 0x0002, - onReportIlluminanceMeasurementMaxMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0400, 0x0003, - onReportIlluminanceMeasurementToleranceCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0400, 0x0004, - onReportIlluminanceMeasurementLightSensorTypeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0400, 0xFFFD, - onReportIlluminanceMeasurementClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0509, 0xFFFD, onReportKeypadInputClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0000, onReportLevelControlCurrentLevelCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0001, onReportLevelControlRemainingTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0002, onReportLevelControlMinLevelCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0003, onReportLevelControlMaxLevelCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0004, onReportLevelControlCurrentFrequencyCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0005, onReportLevelControlMinFrequencyCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0006, onReportLevelControlMaxFrequencyCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x000F, onReportLevelControlOptionsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0010, - onReportLevelControlOnOffTransitionTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0011, onReportLevelControlOnLevelCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0012, onReportLevelControlOnTransitionTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0013, - onReportLevelControlOffTransitionTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0014, onReportLevelControlDefaultMoveRateCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x4000, - onReportLevelControlStartUpCurrentLevelCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0xFFFD, onReportLevelControlClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0508, 0xFFFD, onReportLowPowerClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0507, 0x0001, onReportMediaInputCurrentMediaInputCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0507, 0xFFFD, onReportMediaInputClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0x0000, onReportMediaPlaybackPlaybackStateCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0x0001, onReportMediaPlaybackStartTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0x0002, onReportMediaPlaybackDurationCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0x0005, onReportMediaPlaybackSeekRangeEndCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0x0006, onReportMediaPlaybackSeekRangeStartCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0xFFFD, onReportMediaPlaybackClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0050, 0x0000, onReportModeSelectCurrentModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0050, 0x0002, onReportModeSelectOnModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0050, 0x0003, onReportModeSelectStartUpModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0050, 0x0004, onReportModeSelectDescriptionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0050, 0xFFFD, onReportModeSelectClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0031, 0xFFFC, - onReportNetworkCommissioningFeatureMapCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0031, 0xFFFD, - onReportNetworkCommissioningClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0029, 0xFFFD, - onReportOtaSoftwareUpdateProviderClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002A, 0x0001, - onReportOtaSoftwareUpdateRequestorDefaultOtaProviderCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002A, 0x0002, - onReportOtaSoftwareUpdateRequestorUpdatePossibleCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002A, 0xFFFD, - onReportOtaSoftwareUpdateRequestorClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0406, 0x0000, onReportOccupancySensingOccupancyCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0406, 0x0001, - onReportOccupancySensingOccupancySensorTypeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0406, 0x0002, - onReportOccupancySensingOccupancySensorTypeBitmapCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0406, 0xFFFD, - onReportOccupancySensingClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0006, 0x0000, onReportOnOffOnOffCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0006, 0x4000, onReportOnOffGlobalSceneControlCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0006, 0x4001, onReportOnOffOnTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0006, 0x4002, onReportOnOffOffWaitTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0006, 0x4003, onReportOnOffStartUpOnOffCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0006, 0xFFFC, onReportOnOffFeatureMapCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0006, 0xFFFD, onReportOnOffClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0007, 0x0000, - onReportOnOffSwitchConfigurationSwitchTypeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0007, 0x0010, - onReportOnOffSwitchConfigurationSwitchActionsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0007, 0xFFFD, - onReportOnOffSwitchConfigurationClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003E, 0x0002, - onReportOperationalCredentialsSupportedFabricsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003E, 0x0003, - onReportOperationalCredentialsCommissionedFabricsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003E, 0x0005, - onReportOperationalCredentialsCurrentFabricIndexCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003E, 0xFFFD, - onReportOperationalCredentialsClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002F, 0x0000, onReportPowerSourceStatusCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002F, 0x0001, onReportPowerSourceOrderCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002F, 0x0002, onReportPowerSourceDescriptionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002F, 0x000B, onReportPowerSourceBatteryVoltageCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002F, 0x000C, - onReportPowerSourceBatteryPercentRemainingCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002F, 0x000D, - onReportPowerSourceBatteryTimeRemainingCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002F, 0x000E, - onReportPowerSourceBatteryChargeLevelCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002F, 0x001A, - onReportPowerSourceBatteryChargeStateCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002F, 0xFFFC, onReportPowerSourceFeatureMapCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002F, 0xFFFD, onReportPowerSourceClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0403, 0x0000, - onReportPressureMeasurementMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0403, 0x0001, - onReportPressureMeasurementMinMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0403, 0x0002, - onReportPressureMeasurementMaxMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0403, 0xFFFD, - onReportPressureMeasurementClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0000, - onReportPumpConfigurationAndControlMaxPressureCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0001, - onReportPumpConfigurationAndControlMaxSpeedCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0002, - onReportPumpConfigurationAndControlMaxFlowCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0003, - onReportPumpConfigurationAndControlMinConstPressureCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0004, - onReportPumpConfigurationAndControlMaxConstPressureCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0005, - onReportPumpConfigurationAndControlMinCompPressureCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0006, - onReportPumpConfigurationAndControlMaxCompPressureCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0007, - onReportPumpConfigurationAndControlMinConstSpeedCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0008, - onReportPumpConfigurationAndControlMaxConstSpeedCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0009, - onReportPumpConfigurationAndControlMinConstFlowCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x000A, - onReportPumpConfigurationAndControlMaxConstFlowCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x000B, - onReportPumpConfigurationAndControlMinConstTempCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x000C, - onReportPumpConfigurationAndControlMaxConstTempCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0010, - onReportPumpConfigurationAndControlPumpStatusCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0011, - onReportPumpConfigurationAndControlEffectiveOperationModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0012, - onReportPumpConfigurationAndControlEffectiveControlModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0013, - onReportPumpConfigurationAndControlCapacityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0014, - onReportPumpConfigurationAndControlSpeedCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0015, - onReportPumpConfigurationAndControlLifetimeRunningHoursCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0016, - onReportPumpConfigurationAndControlPowerCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0017, - onReportPumpConfigurationAndControlLifetimeEnergyConsumedCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0020, - onReportPumpConfigurationAndControlOperationModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0021, - onReportPumpConfigurationAndControlControlModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0022, - onReportPumpConfigurationAndControlAlarmMaskCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0xFFFC, - onReportPumpConfigurationAndControlFeatureMapCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0xFFFD, - onReportPumpConfigurationAndControlClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0405, 0x0000, - onReportRelativeHumidityMeasurementMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0405, 0x0001, - onReportRelativeHumidityMeasurementMinMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0405, 0x0002, - onReportRelativeHumidityMeasurementMaxMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0405, 0x0003, - onReportRelativeHumidityMeasurementToleranceCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0405, 0xFFFD, - onReportRelativeHumidityMeasurementClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0005, 0x0000, onReportScenesSceneCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0005, 0x0001, onReportScenesCurrentSceneCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0005, 0x0002, onReportScenesCurrentGroupCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0005, 0x0003, onReportScenesSceneValidCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0005, 0x0004, onReportScenesNameSupportCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0005, 0xFFFD, onReportScenesClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0034, 0x0001, - onReportSoftwareDiagnosticsCurrentHeapFreeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0034, 0x0002, - onReportSoftwareDiagnosticsCurrentHeapUsedCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0034, 0x0003, - onReportSoftwareDiagnosticsCurrentHeapHighWatermarkCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0034, 0xFFFD, - onReportSoftwareDiagnosticsClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003B, 0x0000, onReportSwitchNumberOfPositionsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003B, 0x0001, onReportSwitchCurrentPositionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003B, 0x0002, onReportSwitchMultiPressMaxCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003B, 0xFFFC, onReportSwitchFeatureMapCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003B, 0xFFFD, onReportSwitchClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0504, 0xFFFD, onReportTvChannelClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0505, 0xFFFD, - onReportTargetNavigatorClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0402, 0x0000, - onReportTemperatureMeasurementMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0402, 0x0001, - onReportTemperatureMeasurementMinMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0402, 0x0002, - onReportTemperatureMeasurementMaxMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0402, 0x0003, - onReportTemperatureMeasurementToleranceCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0402, 0xFFFD, - onReportTemperatureMeasurementClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0000, onReportTestClusterBooleanCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0001, onReportTestClusterBitmap8Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0002, onReportTestClusterBitmap16Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0003, onReportTestClusterBitmap32Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0004, onReportTestClusterBitmap64Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0005, onReportTestClusterInt8uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0006, onReportTestClusterInt16uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0007, onReportTestClusterInt24uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0008, onReportTestClusterInt32uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0009, onReportTestClusterInt40uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x000A, onReportTestClusterInt48uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x000B, onReportTestClusterInt56uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x000C, onReportTestClusterInt64uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x000D, onReportTestClusterInt8sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x000E, onReportTestClusterInt16sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x000F, onReportTestClusterInt24sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0010, onReportTestClusterInt32sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0011, onReportTestClusterInt40sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0012, onReportTestClusterInt48sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0013, onReportTestClusterInt56sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0014, onReportTestClusterInt64sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0015, onReportTestClusterEnum8Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0016, onReportTestClusterEnum16Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0017, onReportTestClusterFloatSingleCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0018, onReportTestClusterFloatDoubleCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0019, onReportTestClusterOctetStringCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x001D, onReportTestClusterLongOctetStringCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x001E, onReportTestClusterCharStringCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x001F, onReportTestClusterLongCharStringCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0020, onReportTestClusterEpochUsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0021, onReportTestClusterEpochSCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0022, onReportTestClusterVendorIdCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0024, onReportTestClusterEnumAttrCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0026, - onReportTestClusterRangeRestrictedInt8uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0027, - onReportTestClusterRangeRestrictedInt8sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0028, - onReportTestClusterRangeRestrictedInt16uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0029, - onReportTestClusterRangeRestrictedInt16sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x00FF, onReportTestClusterUnsupportedCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8000, onReportTestClusterNullableBooleanCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8001, onReportTestClusterNullableBitmap8Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8002, onReportTestClusterNullableBitmap16Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8003, onReportTestClusterNullableBitmap32Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8004, onReportTestClusterNullableBitmap64Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8005, onReportTestClusterNullableInt8uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8006, onReportTestClusterNullableInt16uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8007, onReportTestClusterNullableInt24uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8008, onReportTestClusterNullableInt32uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8009, onReportTestClusterNullableInt40uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x800A, onReportTestClusterNullableInt48uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x800B, onReportTestClusterNullableInt56uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x800C, onReportTestClusterNullableInt64uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x800D, onReportTestClusterNullableInt8sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x800E, onReportTestClusterNullableInt16sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x800F, onReportTestClusterNullableInt24sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8010, onReportTestClusterNullableInt32sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8011, onReportTestClusterNullableInt40sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8012, onReportTestClusterNullableInt48sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8013, onReportTestClusterNullableInt56sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8014, onReportTestClusterNullableInt64sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8015, onReportTestClusterNullableEnum8Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8016, onReportTestClusterNullableEnum16Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8017, - onReportTestClusterNullableFloatSingleCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8018, - onReportTestClusterNullableFloatDoubleCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8019, - onReportTestClusterNullableOctetStringCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x801E, - onReportTestClusterNullableCharStringCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8024, onReportTestClusterNullableEnumAttrCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8026, - onReportTestClusterNullableRangeRestrictedInt8uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8027, - onReportTestClusterNullableRangeRestrictedInt8sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8028, - onReportTestClusterNullableRangeRestrictedInt16uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8029, - onReportTestClusterNullableRangeRestrictedInt16sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0xFFFD, onReportTestClusterClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0000, onReportThermostatLocalTemperatureCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0003, - onReportThermostatAbsMinHeatSetpointLimitCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0004, - onReportThermostatAbsMaxHeatSetpointLimitCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0005, - onReportThermostatAbsMinCoolSetpointLimitCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0006, - onReportThermostatAbsMaxCoolSetpointLimitCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0011, - onReportThermostatOccupiedCoolingSetpointCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0012, - onReportThermostatOccupiedHeatingSetpointCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0015, - onReportThermostatMinHeatSetpointLimitCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0016, - onReportThermostatMaxHeatSetpointLimitCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0017, - onReportThermostatMinCoolSetpointLimitCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0018, - onReportThermostatMaxCoolSetpointLimitCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0019, - onReportThermostatMinSetpointDeadBandCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x001B, - onReportThermostatControlSequenceOfOperationCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x001C, onReportThermostatSystemModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0020, onReportThermostatStartOfWeekCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0021, - onReportThermostatNumberOfWeeklyTransitionsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0022, - onReportThermostatNumberOfDailyTransitionsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0xFFFC, onReportThermostatFeatureMapCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0xFFFD, onReportThermostatClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0204, 0x0000, - onReportThermostatUserInterfaceConfigurationTemperatureDisplayModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0204, 0x0001, - onReportThermostatUserInterfaceConfigurationKeypadLockoutCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0204, 0x0002, - onReportThermostatUserInterfaceConfigurationScheduleProgrammingVisibilityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0204, 0xFFFD, - onReportThermostatUserInterfaceConfigurationClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0000, - onReportThreadNetworkDiagnosticsChannelCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0001, - onReportThreadNetworkDiagnosticsRoutingRoleCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0002, - onReportThreadNetworkDiagnosticsNetworkNameCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0003, - onReportThreadNetworkDiagnosticsPanIdCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0004, - onReportThreadNetworkDiagnosticsExtendedPanIdCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0005, - onReportThreadNetworkDiagnosticsMeshLocalPrefixCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0006, - onReportThreadNetworkDiagnosticsOverrunCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0009, - onReportThreadNetworkDiagnosticsPartitionIdCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x000A, - onReportThreadNetworkDiagnosticsWeightingCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x000B, - onReportThreadNetworkDiagnosticsDataVersionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x000C, - onReportThreadNetworkDiagnosticsStableDataVersionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x000D, - onReportThreadNetworkDiagnosticsLeaderRouterIdCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x000E, - onReportThreadNetworkDiagnosticsDetachedRoleCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x000F, - onReportThreadNetworkDiagnosticsChildRoleCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0010, - onReportThreadNetworkDiagnosticsRouterRoleCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0011, - onReportThreadNetworkDiagnosticsLeaderRoleCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0012, - onReportThreadNetworkDiagnosticsAttachAttemptCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0013, - onReportThreadNetworkDiagnosticsPartitionIdChangeCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0014, - onReportThreadNetworkDiagnosticsBetterPartitionAttachAttemptCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0015, - onReportThreadNetworkDiagnosticsParentChangeCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0016, - onReportThreadNetworkDiagnosticsTxTotalCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0017, - onReportThreadNetworkDiagnosticsTxUnicastCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0018, - onReportThreadNetworkDiagnosticsTxBroadcastCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0019, - onReportThreadNetworkDiagnosticsTxAckRequestedCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x001A, - onReportThreadNetworkDiagnosticsTxAckedCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x001B, - onReportThreadNetworkDiagnosticsTxNoAckRequestedCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x001C, - onReportThreadNetworkDiagnosticsTxDataCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x001D, - onReportThreadNetworkDiagnosticsTxDataPollCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x001E, - onReportThreadNetworkDiagnosticsTxBeaconCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x001F, - onReportThreadNetworkDiagnosticsTxBeaconRequestCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0020, - onReportThreadNetworkDiagnosticsTxOtherCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0021, - onReportThreadNetworkDiagnosticsTxRetryCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0022, - onReportThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0023, - onReportThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0024, - onReportThreadNetworkDiagnosticsTxErrCcaCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0025, - onReportThreadNetworkDiagnosticsTxErrAbortCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0026, - onReportThreadNetworkDiagnosticsTxErrBusyChannelCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0027, - onReportThreadNetworkDiagnosticsRxTotalCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0028, - onReportThreadNetworkDiagnosticsRxUnicastCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0029, - onReportThreadNetworkDiagnosticsRxBroadcastCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x002A, - onReportThreadNetworkDiagnosticsRxDataCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x002B, - onReportThreadNetworkDiagnosticsRxDataPollCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x002C, - onReportThreadNetworkDiagnosticsRxBeaconCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x002D, - onReportThreadNetworkDiagnosticsRxBeaconRequestCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x002E, - onReportThreadNetworkDiagnosticsRxOtherCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x002F, - onReportThreadNetworkDiagnosticsRxAddressFilteredCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0030, - onReportThreadNetworkDiagnosticsRxDestAddrFilteredCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0031, - onReportThreadNetworkDiagnosticsRxDuplicatedCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0032, - onReportThreadNetworkDiagnosticsRxErrNoFrameCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0033, - onReportThreadNetworkDiagnosticsRxErrUnknownNeighborCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0034, - onReportThreadNetworkDiagnosticsRxErrInvalidSrcAddrCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0035, - onReportThreadNetworkDiagnosticsRxErrSecCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0036, - onReportThreadNetworkDiagnosticsRxErrFcsCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0037, - onReportThreadNetworkDiagnosticsRxErrOtherCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0038, - onReportThreadNetworkDiagnosticsActiveTimestampCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0039, - onReportThreadNetworkDiagnosticsPendingTimestampCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x003A, - onReportThreadNetworkDiagnosticsDelayCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x003C, - onReportThreadNetworkDiagnosticsChannelMaskCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0xFFFD, - onReportThreadNetworkDiagnosticsClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0503, 0x0000, onReportWakeOnLanWakeOnLanMacAddressCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0503, 0xFFFD, onReportWakeOnLanClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x0000, onReportWiFiNetworkDiagnosticsBssidCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x0001, - onReportWiFiNetworkDiagnosticsSecurityTypeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x0002, - onReportWiFiNetworkDiagnosticsWiFiVersionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x0003, - onReportWiFiNetworkDiagnosticsChannelNumberCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x0004, onReportWiFiNetworkDiagnosticsRssiCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x0005, - onReportWiFiNetworkDiagnosticsBeaconLostCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x0006, - onReportWiFiNetworkDiagnosticsBeaconRxCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x0007, - onReportWiFiNetworkDiagnosticsPacketMulticastRxCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x0008, - onReportWiFiNetworkDiagnosticsPacketMulticastTxCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x0009, - onReportWiFiNetworkDiagnosticsPacketUnicastRxCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x000A, - onReportWiFiNetworkDiagnosticsPacketUnicastTxCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x000B, - onReportWiFiNetworkDiagnosticsCurrentMaxRateCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x000C, - onReportWiFiNetworkDiagnosticsOverrunCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0xFFFD, - onReportWiFiNetworkDiagnosticsClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0000, onReportWindowCoveringTypeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0003, - onReportWindowCoveringCurrentPositionLiftCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0004, - onReportWindowCoveringCurrentPositionTiltCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0007, onReportWindowCoveringConfigStatusCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0008, - onReportWindowCoveringCurrentPositionLiftPercentageCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0009, - onReportWindowCoveringCurrentPositionTiltPercentageCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x000A, - onReportWindowCoveringOperationalStatusCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x000B, - onReportWindowCoveringTargetPositionLiftPercent100thsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x000C, - onReportWindowCoveringTargetPositionTiltPercent100thsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x000D, onReportWindowCoveringEndProductTypeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x000E, - onReportWindowCoveringCurrentPositionLiftPercent100thsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x000F, - onReportWindowCoveringCurrentPositionTiltPercent100thsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0010, - onReportWindowCoveringInstalledOpenLimitLiftCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0011, - onReportWindowCoveringInstalledClosedLimitLiftCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0012, - onReportWindowCoveringInstalledOpenLimitTiltCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0013, - onReportWindowCoveringInstalledClosedLimitTiltCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0017, onReportWindowCoveringModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x001A, onReportWindowCoveringSafetyStatusCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0xFFFC, onReportWindowCoveringFeatureMapCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0xFFFD, - onReportWindowCoveringClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - } - -private: - chip::Callback::Callback * - onReportAccountLoginClusterRevisionCallback = - new chip::Callback::Callback( - ReadAccountLoginClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportAdministratorCommissioningClusterRevisionCallback = - new chip::Callback::Callback( - ReadAdministratorCommissioningClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportApplicationBasicVendorNameCallback = - new chip::Callback::Callback( - ReadApplicationBasicVendorName::OnAttributeResponse, this); - chip::Callback::Callback * - onReportApplicationBasicVendorIdCallback = - new chip::Callback::Callback( - ReadApplicationBasicVendorId::OnAttributeResponse, this); - chip::Callback::Callback * - onReportApplicationBasicApplicationNameCallback = - new chip::Callback::Callback( - ReadApplicationBasicApplicationName::OnAttributeResponse, this); - chip::Callback::Callback * - onReportApplicationBasicProductIdCallback = - new chip::Callback::Callback( - ReadApplicationBasicProductId::OnAttributeResponse, this); - chip::Callback::Callback * - onReportApplicationBasicApplicationStatusCallback = - new chip::Callback::Callback( - ReadApplicationBasicApplicationStatus::OnAttributeResponse, this); - chip::Callback::Callback * - onReportApplicationBasicApplicationVersionCallback = - new chip::Callback::Callback( - ReadApplicationBasicApplicationVersion::OnAttributeResponse, this); - chip::Callback::Callback * - onReportApplicationBasicClusterRevisionCallback = - new chip::Callback::Callback( - ReadApplicationBasicClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportApplicationLauncherClusterRevisionCallback = - new chip::Callback::Callback( - ReadApplicationLauncherClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportAudioOutputCurrentAudioOutputCallback = - new chip::Callback::Callback( - ReadAudioOutputCurrentAudioOutput::OnAttributeResponse, this); - chip::Callback::Callback * - onReportAudioOutputClusterRevisionCallback = - new chip::Callback::Callback( - ReadAudioOutputClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBarrierControlBarrierMovingStateCallback = - new chip::Callback::Callback( - ReadBarrierControlBarrierMovingState::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBarrierControlBarrierSafetyStatusCallback = - new chip::Callback::Callback( - ReadBarrierControlBarrierSafetyStatus::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBarrierControlBarrierCapabilitiesCallback = - new chip::Callback::Callback( - ReadBarrierControlBarrierCapabilities::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBarrierControlBarrierPositionCallback = - new chip::Callback::Callback( - ReadBarrierControlBarrierPosition::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBarrierControlClusterRevisionCallback = - new chip::Callback::Callback( - ReadBarrierControlClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBasicInteractionModelVersionCallback = - new chip::Callback::Callback( - ReadBasicInteractionModelVersion::OnAttributeResponse, this); - chip::Callback::Callback * onReportBasicVendorNameCallback = - new chip::Callback::Callback(ReadBasicVendorName::OnAttributeResponse, - this); - chip::Callback::Callback * onReportBasicVendorIDCallback = - new chip::Callback::Callback(ReadBasicVendorID::OnAttributeResponse, - this); - chip::Callback::Callback * onReportBasicProductNameCallback = - new chip::Callback::Callback( - ReadBasicProductName::OnAttributeResponse, this); - chip::Callback::Callback * onReportBasicProductIDCallback = - new chip::Callback::Callback(ReadBasicProductID::OnAttributeResponse, - this); - chip::Callback::Callback * onReportBasicNodeLabelCallback = - new chip::Callback::Callback(ReadBasicNodeLabel::OnAttributeResponse, - this); - chip::Callback::Callback * onReportBasicLocationCallback = - new chip::Callback::Callback(ReadBasicLocation::OnAttributeResponse, - this); - chip::Callback::Callback * onReportBasicHardwareVersionCallback = - new chip::Callback::Callback( - ReadBasicHardwareVersion::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBasicHardwareVersionStringCallback = - new chip::Callback::Callback( - ReadBasicHardwareVersionString::OnAttributeResponse, this); - chip::Callback::Callback * onReportBasicSoftwareVersionCallback = - new chip::Callback::Callback( - ReadBasicSoftwareVersion::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBasicSoftwareVersionStringCallback = - new chip::Callback::Callback( - ReadBasicSoftwareVersionString::OnAttributeResponse, this); - chip::Callback::Callback * onReportBasicManufacturingDateCallback = - new chip::Callback::Callback( - ReadBasicManufacturingDate::OnAttributeResponse, this); - chip::Callback::Callback * onReportBasicPartNumberCallback = - new chip::Callback::Callback(ReadBasicPartNumber::OnAttributeResponse, - this); - chip::Callback::Callback * onReportBasicProductURLCallback = - new chip::Callback::Callback(ReadBasicProductURL::OnAttributeResponse, - this); - chip::Callback::Callback * onReportBasicProductLabelCallback = - new chip::Callback::Callback( - ReadBasicProductLabel::OnAttributeResponse, this); - chip::Callback::Callback * onReportBasicSerialNumberCallback = - new chip::Callback::Callback( - ReadBasicSerialNumber::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBasicLocalConfigDisabledCallback = - new chip::Callback::Callback( - ReadBasicLocalConfigDisabled::OnAttributeResponse, this); - chip::Callback::Callback * onReportBasicReachableCallback = - new chip::Callback::Callback(ReadBasicReachable::OnAttributeResponse, - this); - chip::Callback::Callback * onReportBasicClusterRevisionCallback = - new chip::Callback::Callback( - ReadBasicClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBinaryInputBasicOutOfServiceCallback = - new chip::Callback::Callback( - ReadBinaryInputBasicOutOfService::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBinaryInputBasicPresentValueCallback = - new chip::Callback::Callback( - ReadBinaryInputBasicPresentValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBinaryInputBasicStatusFlagsCallback = - new chip::Callback::Callback( - ReadBinaryInputBasicStatusFlags::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBinaryInputBasicClusterRevisionCallback = - new chip::Callback::Callback( - ReadBinaryInputBasicClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportBindingClusterRevisionCallback = - new chip::Callback::Callback( - ReadBindingClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportBooleanStateStateValueCallback = - new chip::Callback::Callback( - ReadBooleanStateStateValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBooleanStateClusterRevisionCallback = - new chip::Callback::Callback( - ReadBooleanStateClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportBridgedActionsSetupUrlCallback = - new chip::Callback::Callback( - ReadBridgedActionsSetupUrl::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBridgedActionsClusterRevisionCallback = - new chip::Callback::Callback( - ReadBridgedActionsClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBridgedDeviceBasicClusterRevisionCallback = - new chip::Callback::Callback( - ReadBridgedDeviceBasicClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlCurrentHueCallback = - new chip::Callback::Callback( - ReadColorControlCurrentHue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlCurrentSaturationCallback = - new chip::Callback::Callback( - ReadColorControlCurrentSaturation::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlRemainingTimeCallback = - new chip::Callback::Callback( - ReadColorControlRemainingTime::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlCurrentXCallback = - new chip::Callback::Callback( - ReadColorControlCurrentX::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlCurrentYCallback = - new chip::Callback::Callback( - ReadColorControlCurrentY::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlDriftCompensationCallback = - new chip::Callback::Callback( - ReadColorControlDriftCompensation::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlCompensationTextCallback = - new chip::Callback::Callback( - ReadColorControlCompensationText::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorTemperatureCallback = - new chip::Callback::Callback( - ReadColorControlColorTemperature::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlColorModeCallback = - new chip::Callback::Callback( - ReadColorControlColorMode::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorControlOptionsCallback = - new chip::Callback::Callback( - ReadColorControlColorControlOptions::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlNumberOfPrimariesCallback = - new chip::Callback::Callback( - ReadColorControlNumberOfPrimaries::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary1XCallback = - new chip::Callback::Callback( - ReadColorControlPrimary1X::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary1YCallback = - new chip::Callback::Callback( - ReadColorControlPrimary1Y::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlPrimary1IntensityCallback = - new chip::Callback::Callback( - ReadColorControlPrimary1Intensity::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary2XCallback = - new chip::Callback::Callback( - ReadColorControlPrimary2X::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary2YCallback = - new chip::Callback::Callback( - ReadColorControlPrimary2Y::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlPrimary2IntensityCallback = - new chip::Callback::Callback( - ReadColorControlPrimary2Intensity::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary3XCallback = - new chip::Callback::Callback( - ReadColorControlPrimary3X::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary3YCallback = - new chip::Callback::Callback( - ReadColorControlPrimary3Y::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlPrimary3IntensityCallback = - new chip::Callback::Callback( - ReadColorControlPrimary3Intensity::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary4XCallback = - new chip::Callback::Callback( - ReadColorControlPrimary4X::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary4YCallback = - new chip::Callback::Callback( - ReadColorControlPrimary4Y::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlPrimary4IntensityCallback = - new chip::Callback::Callback( - ReadColorControlPrimary4Intensity::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary5XCallback = - new chip::Callback::Callback( - ReadColorControlPrimary5X::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary5YCallback = - new chip::Callback::Callback( - ReadColorControlPrimary5Y::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlPrimary5IntensityCallback = - new chip::Callback::Callback( - ReadColorControlPrimary5Intensity::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary6XCallback = - new chip::Callback::Callback( - ReadColorControlPrimary6X::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary6YCallback = - new chip::Callback::Callback( - ReadColorControlPrimary6Y::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlPrimary6IntensityCallback = - new chip::Callback::Callback( - ReadColorControlPrimary6Intensity::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlWhitePointXCallback = - new chip::Callback::Callback( - ReadColorControlWhitePointX::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlWhitePointYCallback = - new chip::Callback::Callback( - ReadColorControlWhitePointY::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorPointRXCallback = - new chip::Callback::Callback( - ReadColorControlColorPointRX::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorPointRYCallback = - new chip::Callback::Callback( - ReadColorControlColorPointRY::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorPointRIntensityCallback = - new chip::Callback::Callback( - ReadColorControlColorPointRIntensity::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorPointGXCallback = - new chip::Callback::Callback( - ReadColorControlColorPointGX::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorPointGYCallback = - new chip::Callback::Callback( - ReadColorControlColorPointGY::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorPointGIntensityCallback = - new chip::Callback::Callback( - ReadColorControlColorPointGIntensity::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorPointBXCallback = - new chip::Callback::Callback( - ReadColorControlColorPointBX::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorPointBYCallback = - new chip::Callback::Callback( - ReadColorControlColorPointBY::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorPointBIntensityCallback = - new chip::Callback::Callback( - ReadColorControlColorPointBIntensity::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlEnhancedCurrentHueCallback = - new chip::Callback::Callback( - ReadColorControlEnhancedCurrentHue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlEnhancedColorModeCallback = - new chip::Callback::Callback( - ReadColorControlEnhancedColorMode::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorLoopActiveCallback = - new chip::Callback::Callback( - ReadColorControlColorLoopActive::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorLoopDirectionCallback = - new chip::Callback::Callback( - ReadColorControlColorLoopDirection::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorLoopTimeCallback = - new chip::Callback::Callback( - ReadColorControlColorLoopTime::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorLoopStartEnhancedHueCallback = - new chip::Callback::Callback( - ReadColorControlColorLoopStartEnhancedHue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorLoopStoredEnhancedHueCallback = - new chip::Callback::Callback( - ReadColorControlColorLoopStoredEnhancedHue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorCapabilitiesCallback = - new chip::Callback::Callback( - ReadColorControlColorCapabilities::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorTempPhysicalMinCallback = - new chip::Callback::Callback( - ReadColorControlColorTempPhysicalMin::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorTempPhysicalMaxCallback = - new chip::Callback::Callback( - ReadColorControlColorTempPhysicalMax::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlCoupleColorTempToLevelMinMiredsCallback = - new chip::Callback::Callback( - ReadColorControlCoupleColorTempToLevelMinMireds::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlStartUpColorTemperatureMiredsCallback = - new chip::Callback::Callback( - ReadColorControlStartUpColorTemperatureMireds::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlClusterRevisionCallback = - new chip::Callback::Callback( - ReadColorControlClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportContentLauncherSupportedStreamingProtocolsCallback = - new chip::Callback::Callback( - ReadContentLauncherSupportedStreamingProtocols::OnAttributeResponse, this); - chip::Callback::Callback * - onReportContentLauncherClusterRevisionCallback = - new chip::Callback::Callback( - ReadContentLauncherClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportDescriptorClusterRevisionCallback = - new chip::Callback::Callback( - ReadDescriptorClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportDoorLockLockStateCallback = - new chip::Callback::Callback( - ReadDoorLockLockState::OnAttributeResponse, this); - chip::Callback::Callback * onReportDoorLockLockTypeCallback = - new chip::Callback::Callback( - ReadDoorLockLockType::OnAttributeResponse, this); - chip::Callback::Callback * - onReportDoorLockActuatorEnabledCallback = - new chip::Callback::Callback( - ReadDoorLockActuatorEnabled::OnAttributeResponse, this); - chip::Callback::Callback * onReportDoorLockDoorStateCallback = - new chip::Callback::Callback( - ReadDoorLockDoorState::OnAttributeResponse, this); - chip::Callback::Callback * onReportDoorLockLanguageCallback = - new chip::Callback::Callback( - ReadDoorLockLanguage::OnAttributeResponse, this); - chip::Callback::Callback * onReportDoorLockAutoRelockTimeCallback = - new chip::Callback::Callback( - ReadDoorLockAutoRelockTime::OnAttributeResponse, this); - chip::Callback::Callback * onReportDoorLockSoundVolumeCallback = - new chip::Callback::Callback( - ReadDoorLockSoundVolume::OnAttributeResponse, this); - chip::Callback::Callback * onReportDoorLockOperatingModeCallback = - new chip::Callback::Callback( - ReadDoorLockOperatingMode::OnAttributeResponse, this); - chip::Callback::Callback * - onReportDoorLockEnableOneTouchLockingCallback = - new chip::Callback::Callback( - ReadDoorLockEnableOneTouchLocking::OnAttributeResponse, this); - chip::Callback::Callback * - onReportDoorLockEnablePrivacyModeButtonCallback = - new chip::Callback::Callback( - ReadDoorLockEnablePrivacyModeButton::OnAttributeResponse, this); - chip::Callback::Callback * - onReportDoorLockWrongCodeEntryLimitCallback = - new chip::Callback::Callback( - ReadDoorLockWrongCodeEntryLimit::OnAttributeResponse, this); - chip::Callback::Callback * - onReportDoorLockClusterRevisionCallback = - new chip::Callback::Callback( - ReadDoorLockClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementMeasurementTypeCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementMeasurementType::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementTotalActivePowerCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementTotalActivePower::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementRmsVoltageCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementRmsVoltage::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementRmsVoltageMinCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementRmsVoltageMin::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementRmsVoltageMaxCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementRmsVoltageMax::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementRmsCurrentCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementRmsCurrent::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementRmsCurrentMinCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementRmsCurrentMin::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementRmsCurrentMaxCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementRmsCurrentMax::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementActivePowerCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementActivePower::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementActivePowerMinCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementActivePowerMin::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementActivePowerMaxCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementActivePowerMax::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementClusterRevisionCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportEthernetNetworkDiagnosticsPHYRateCallback = - new chip::Callback::Callback( - ReadEthernetNetworkDiagnosticsPHYRate::OnAttributeResponse, this); - chip::Callback::Callback * - onReportEthernetNetworkDiagnosticsFullDuplexCallback = - new chip::Callback::Callback( - ReadEthernetNetworkDiagnosticsFullDuplex::OnAttributeResponse, this); - chip::Callback::Callback * - onReportEthernetNetworkDiagnosticsPacketRxCountCallback = - new chip::Callback::Callback( - ReadEthernetNetworkDiagnosticsPacketRxCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportEthernetNetworkDiagnosticsPacketTxCountCallback = - new chip::Callback::Callback( - ReadEthernetNetworkDiagnosticsPacketTxCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportEthernetNetworkDiagnosticsTxErrCountCallback = - new chip::Callback::Callback( - ReadEthernetNetworkDiagnosticsTxErrCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportEthernetNetworkDiagnosticsCollisionCountCallback = - new chip::Callback::Callback( - ReadEthernetNetworkDiagnosticsCollisionCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportEthernetNetworkDiagnosticsOverrunCountCallback = - new chip::Callback::Callback( - ReadEthernetNetworkDiagnosticsOverrunCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportEthernetNetworkDiagnosticsCarrierDetectCallback = - new chip::Callback::Callback( - ReadEthernetNetworkDiagnosticsCarrierDetect::OnAttributeResponse, this); - chip::Callback::Callback * - onReportEthernetNetworkDiagnosticsTimeSinceResetCallback = - new chip::Callback::Callback( - ReadEthernetNetworkDiagnosticsTimeSinceReset::OnAttributeResponse, this); - chip::Callback::Callback * - onReportEthernetNetworkDiagnosticsClusterRevisionCallback = - new chip::Callback::Callback( - ReadEthernetNetworkDiagnosticsClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportFixedLabelClusterRevisionCallback = - new chip::Callback::Callback( - ReadFixedLabelClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportFlowMeasurementMeasuredValueCallback = - new chip::Callback::Callback( - ReadFlowMeasurementMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportFlowMeasurementMinMeasuredValueCallback = - new chip::Callback::Callback( - ReadFlowMeasurementMinMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportFlowMeasurementMaxMeasuredValueCallback = - new chip::Callback::Callback( - ReadFlowMeasurementMaxMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportFlowMeasurementToleranceCallback = - new chip::Callback::Callback( - ReadFlowMeasurementTolerance::OnAttributeResponse, this); - chip::Callback::Callback * - onReportFlowMeasurementClusterRevisionCallback = - new chip::Callback::Callback( - ReadFlowMeasurementClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportGeneralCommissioningBreadcrumbCallback = - new chip::Callback::Callback( - ReadGeneralCommissioningBreadcrumb::OnAttributeResponse, this); - chip::Callback::Callback * - onReportGeneralCommissioningClusterRevisionCallback = - new chip::Callback::Callback( - ReadGeneralCommissioningClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportGeneralDiagnosticsRebootCountCallback = - new chip::Callback::Callback( - ReadGeneralDiagnosticsRebootCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportGeneralDiagnosticsUpTimeCallback = - new chip::Callback::Callback( - ReadGeneralDiagnosticsUpTime::OnAttributeResponse, this); - chip::Callback::Callback * - onReportGeneralDiagnosticsTotalOperationalHoursCallback = - new chip::Callback::Callback( - ReadGeneralDiagnosticsTotalOperationalHours::OnAttributeResponse, this); - chip::Callback::Callback * - onReportGeneralDiagnosticsBootReasonsCallback = - new chip::Callback::Callback( - ReadGeneralDiagnosticsBootReasons::OnAttributeResponse, this); - chip::Callback::Callback * - onReportGeneralDiagnosticsClusterRevisionCallback = - new chip::Callback::Callback( - ReadGeneralDiagnosticsClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportGroupKeyManagementClusterRevisionCallback = - new chip::Callback::Callback( - ReadGroupKeyManagementClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportGroupsNameSupportCallback = - new chip::Callback::Callback( - ReadGroupsNameSupport::OnAttributeResponse, this); - chip::Callback::Callback * onReportGroupsClusterRevisionCallback = - new chip::Callback::Callback( - ReadGroupsClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportIdentifyIdentifyTimeCallback = - new chip::Callback::Callback( - ReadIdentifyIdentifyTime::OnAttributeResponse, this); - chip::Callback::Callback * onReportIdentifyIdentifyTypeCallback = - new chip::Callback::Callback( - ReadIdentifyIdentifyType::OnAttributeResponse, this); - chip::Callback::Callback * - onReportIdentifyClusterRevisionCallback = - new chip::Callback::Callback( - ReadIdentifyClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportIlluminanceMeasurementMeasuredValueCallback = - new chip::Callback::Callback( - ReadIlluminanceMeasurementMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportIlluminanceMeasurementMinMeasuredValueCallback = - new chip::Callback::Callback( - ReadIlluminanceMeasurementMinMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportIlluminanceMeasurementMaxMeasuredValueCallback = - new chip::Callback::Callback( - ReadIlluminanceMeasurementMaxMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportIlluminanceMeasurementToleranceCallback = - new chip::Callback::Callback( - ReadIlluminanceMeasurementTolerance::OnAttributeResponse, this); - chip::Callback::Callback * - onReportIlluminanceMeasurementLightSensorTypeCallback = - new chip::Callback::Callback( - ReadIlluminanceMeasurementLightSensorType::OnAttributeResponse, this); - chip::Callback::Callback * - onReportIlluminanceMeasurementClusterRevisionCallback = - new chip::Callback::Callback( - ReadIlluminanceMeasurementClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportKeypadInputClusterRevisionCallback = - new chip::Callback::Callback( - ReadKeypadInputClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlCurrentLevelCallback = - new chip::Callback::Callback( - ReadLevelControlCurrentLevel::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlRemainingTimeCallback = - new chip::Callback::Callback( - ReadLevelControlRemainingTime::OnAttributeResponse, this); - chip::Callback::Callback * onReportLevelControlMinLevelCallback = - new chip::Callback::Callback( - ReadLevelControlMinLevel::OnAttributeResponse, this); - chip::Callback::Callback * onReportLevelControlMaxLevelCallback = - new chip::Callback::Callback( - ReadLevelControlMaxLevel::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlCurrentFrequencyCallback = - new chip::Callback::Callback( - ReadLevelControlCurrentFrequency::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlMinFrequencyCallback = - new chip::Callback::Callback( - ReadLevelControlMinFrequency::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlMaxFrequencyCallback = - new chip::Callback::Callback( - ReadLevelControlMaxFrequency::OnAttributeResponse, this); - chip::Callback::Callback * onReportLevelControlOptionsCallback = - new chip::Callback::Callback( - ReadLevelControlOptions::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlOnOffTransitionTimeCallback = - new chip::Callback::Callback( - ReadLevelControlOnOffTransitionTime::OnAttributeResponse, this); - chip::Callback::Callback * onReportLevelControlOnLevelCallback = - new chip::Callback::Callback( - ReadLevelControlOnLevel::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlOnTransitionTimeCallback = - new chip::Callback::Callback( - ReadLevelControlOnTransitionTime::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlOffTransitionTimeCallback = - new chip::Callback::Callback( - ReadLevelControlOffTransitionTime::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlDefaultMoveRateCallback = - new chip::Callback::Callback( - ReadLevelControlDefaultMoveRate::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlStartUpCurrentLevelCallback = - new chip::Callback::Callback( - ReadLevelControlStartUpCurrentLevel::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlClusterRevisionCallback = - new chip::Callback::Callback( - ReadLevelControlClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLowPowerClusterRevisionCallback = - new chip::Callback::Callback( - ReadLowPowerClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportMediaInputCurrentMediaInputCallback = - new chip::Callback::Callback( - ReadMediaInputCurrentMediaInput::OnAttributeResponse, this); - chip::Callback::Callback * - onReportMediaInputClusterRevisionCallback = - new chip::Callback::Callback( - ReadMediaInputClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportMediaPlaybackPlaybackStateCallback = - new chip::Callback::Callback( - ReadMediaPlaybackPlaybackState::OnAttributeResponse, this); - chip::Callback::Callback * onReportMediaPlaybackStartTimeCallback = - new chip::Callback::Callback( - ReadMediaPlaybackStartTime::OnAttributeResponse, this); - chip::Callback::Callback * onReportMediaPlaybackDurationCallback = - new chip::Callback::Callback( - ReadMediaPlaybackDuration::OnAttributeResponse, this); - chip::Callback::Callback * - onReportMediaPlaybackSeekRangeEndCallback = - new chip::Callback::Callback( - ReadMediaPlaybackSeekRangeEnd::OnAttributeResponse, this); - chip::Callback::Callback * - onReportMediaPlaybackSeekRangeStartCallback = - new chip::Callback::Callback( - ReadMediaPlaybackSeekRangeStart::OnAttributeResponse, this); - chip::Callback::Callback * - onReportMediaPlaybackClusterRevisionCallback = - new chip::Callback::Callback( - ReadMediaPlaybackClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportModeSelectCurrentModeCallback = - new chip::Callback::Callback( - ReadModeSelectCurrentMode::OnAttributeResponse, this); - chip::Callback::Callback * onReportModeSelectOnModeCallback = - new chip::Callback::Callback( - ReadModeSelectOnMode::OnAttributeResponse, this); - chip::Callback::Callback * onReportModeSelectStartUpModeCallback = - new chip::Callback::Callback( - ReadModeSelectStartUpMode::OnAttributeResponse, this); - chip::Callback::Callback * onReportModeSelectDescriptionCallback = - new chip::Callback::Callback( - ReadModeSelectDescription::OnAttributeResponse, this); - chip::Callback::Callback * - onReportModeSelectClusterRevisionCallback = - new chip::Callback::Callback( - ReadModeSelectClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportNetworkCommissioningFeatureMapCallback = - new chip::Callback::Callback( - ReadNetworkCommissioningFeatureMap::OnAttributeResponse, this); - chip::Callback::Callback * - onReportNetworkCommissioningClusterRevisionCallback = - new chip::Callback::Callback( - ReadNetworkCommissioningClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOtaSoftwareUpdateProviderClusterRevisionCallback = - new chip::Callback::Callback( - ReadOtaSoftwareUpdateProviderClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOtaSoftwareUpdateRequestorDefaultOtaProviderCallback = - new chip::Callback::Callback( - ReadOtaSoftwareUpdateRequestorDefaultOtaProvider::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOtaSoftwareUpdateRequestorUpdatePossibleCallback = - new chip::Callback::Callback( - ReadOtaSoftwareUpdateRequestorUpdatePossible::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOtaSoftwareUpdateRequestorClusterRevisionCallback = - new chip::Callback::Callback( - ReadOtaSoftwareUpdateRequestorClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOccupancySensingOccupancyCallback = - new chip::Callback::Callback( - ReadOccupancySensingOccupancy::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOccupancySensingOccupancySensorTypeCallback = - new chip::Callback::Callback( - ReadOccupancySensingOccupancySensorType::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOccupancySensingOccupancySensorTypeBitmapCallback = - new chip::Callback::Callback( - ReadOccupancySensingOccupancySensorTypeBitmap::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOccupancySensingClusterRevisionCallback = - new chip::Callback::Callback( - ReadOccupancySensingClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportOnOffOnOffCallback = - new chip::Callback::Callback(ReadOnOffOnOff::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOnOffGlobalSceneControlCallback = - new chip::Callback::Callback( - ReadOnOffGlobalSceneControl::OnAttributeResponse, this); - chip::Callback::Callback * onReportOnOffOnTimeCallback = - new chip::Callback::Callback(ReadOnOffOnTime::OnAttributeResponse, this); - chip::Callback::Callback * onReportOnOffOffWaitTimeCallback = - new chip::Callback::Callback( - ReadOnOffOffWaitTime::OnAttributeResponse, this); - chip::Callback::Callback * onReportOnOffStartUpOnOffCallback = - new chip::Callback::Callback( - ReadOnOffStartUpOnOff::OnAttributeResponse, this); - chip::Callback::Callback * onReportOnOffFeatureMapCallback = - new chip::Callback::Callback(ReadOnOffFeatureMap::OnAttributeResponse, - this); - chip::Callback::Callback * onReportOnOffClusterRevisionCallback = - new chip::Callback::Callback( - ReadOnOffClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOnOffSwitchConfigurationSwitchTypeCallback = - new chip::Callback::Callback( - ReadOnOffSwitchConfigurationSwitchType::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOnOffSwitchConfigurationSwitchActionsCallback = - new chip::Callback::Callback( - ReadOnOffSwitchConfigurationSwitchActions::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOnOffSwitchConfigurationClusterRevisionCallback = - new chip::Callback::Callback( - ReadOnOffSwitchConfigurationClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOperationalCredentialsSupportedFabricsCallback = - new chip::Callback::Callback( - ReadOperationalCredentialsSupportedFabrics::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOperationalCredentialsCommissionedFabricsCallback = - new chip::Callback::Callback( - ReadOperationalCredentialsCommissionedFabrics::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOperationalCredentialsCurrentFabricIndexCallback = - new chip::Callback::Callback( - ReadOperationalCredentialsCurrentFabricIndex::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOperationalCredentialsClusterRevisionCallback = - new chip::Callback::Callback( - ReadOperationalCredentialsClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportPowerSourceStatusCallback = - new chip::Callback::Callback( - ReadPowerSourceStatus::OnAttributeResponse, this); - chip::Callback::Callback * onReportPowerSourceOrderCallback = - new chip::Callback::Callback( - ReadPowerSourceOrder::OnAttributeResponse, this); - chip::Callback::Callback * onReportPowerSourceDescriptionCallback = - new chip::Callback::Callback( - ReadPowerSourceDescription::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPowerSourceBatteryVoltageCallback = - new chip::Callback::Callback( - ReadPowerSourceBatteryVoltage::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPowerSourceBatteryPercentRemainingCallback = - new chip::Callback::Callback( - ReadPowerSourceBatteryPercentRemaining::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPowerSourceBatteryTimeRemainingCallback = - new chip::Callback::Callback( - ReadPowerSourceBatteryTimeRemaining::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPowerSourceBatteryChargeLevelCallback = - new chip::Callback::Callback( - ReadPowerSourceBatteryChargeLevel::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPowerSourceBatteryChargeStateCallback = - new chip::Callback::Callback( - ReadPowerSourceBatteryChargeState::OnAttributeResponse, this); - chip::Callback::Callback * onReportPowerSourceFeatureMapCallback = - new chip::Callback::Callback( - ReadPowerSourceFeatureMap::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPowerSourceClusterRevisionCallback = - new chip::Callback::Callback( - ReadPowerSourceClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPressureMeasurementMeasuredValueCallback = - new chip::Callback::Callback( - ReadPressureMeasurementMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPressureMeasurementMinMeasuredValueCallback = - new chip::Callback::Callback( - ReadPressureMeasurementMinMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPressureMeasurementMaxMeasuredValueCallback = - new chip::Callback::Callback( - ReadPressureMeasurementMaxMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPressureMeasurementClusterRevisionCallback = - new chip::Callback::Callback( - ReadPressureMeasurementClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMaxPressureCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMaxPressure::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMaxSpeedCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMaxSpeed::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMaxFlowCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMaxFlow::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMinConstPressureCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMinConstPressure::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMaxConstPressureCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMaxConstPressure::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMinCompPressureCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMinCompPressure::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMaxCompPressureCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMaxCompPressure::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMinConstSpeedCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMinConstSpeed::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMaxConstSpeedCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMaxConstSpeed::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMinConstFlowCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMinConstFlow::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMaxConstFlowCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMaxConstFlow::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMinConstTempCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMinConstTemp::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMaxConstTempCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMaxConstTemp::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlPumpStatusCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlPumpStatus::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlEffectiveOperationModeCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlEffectiveOperationMode::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlEffectiveControlModeCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlEffectiveControlMode::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlCapacityCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlCapacity::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlSpeedCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlSpeed::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlLifetimeRunningHoursCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlLifetimeRunningHours::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlPowerCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlPower::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlLifetimeEnergyConsumedCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlLifetimeEnergyConsumed::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlOperationModeCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlOperationMode::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlControlModeCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlControlMode::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlAlarmMaskCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlAlarmMask::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlFeatureMapCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlFeatureMap::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlClusterRevisionCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportRelativeHumidityMeasurementMeasuredValueCallback = - new chip::Callback::Callback( - ReadRelativeHumidityMeasurementMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportRelativeHumidityMeasurementMinMeasuredValueCallback = - new chip::Callback::Callback( - ReadRelativeHumidityMeasurementMinMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportRelativeHumidityMeasurementMaxMeasuredValueCallback = - new chip::Callback::Callback( - ReadRelativeHumidityMeasurementMaxMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportRelativeHumidityMeasurementToleranceCallback = - new chip::Callback::Callback( - ReadRelativeHumidityMeasurementTolerance::OnAttributeResponse, this); - chip::Callback::Callback * - onReportRelativeHumidityMeasurementClusterRevisionCallback = - new chip::Callback::Callback( - ReadRelativeHumidityMeasurementClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportScenesSceneCountCallback = - new chip::Callback::Callback( - ReadScenesSceneCount::OnAttributeResponse, this); - chip::Callback::Callback * onReportScenesCurrentSceneCallback = - new chip::Callback::Callback( - ReadScenesCurrentScene::OnAttributeResponse, this); - chip::Callback::Callback * onReportScenesCurrentGroupCallback = - new chip::Callback::Callback( - ReadScenesCurrentGroup::OnAttributeResponse, this); - chip::Callback::Callback * onReportScenesSceneValidCallback = - new chip::Callback::Callback( - ReadScenesSceneValid::OnAttributeResponse, this); - chip::Callback::Callback * onReportScenesNameSupportCallback = - new chip::Callback::Callback( - ReadScenesNameSupport::OnAttributeResponse, this); - chip::Callback::Callback * onReportScenesClusterRevisionCallback = - new chip::Callback::Callback( - ReadScenesClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportSoftwareDiagnosticsCurrentHeapFreeCallback = - new chip::Callback::Callback( - ReadSoftwareDiagnosticsCurrentHeapFree::OnAttributeResponse, this); - chip::Callback::Callback * - onReportSoftwareDiagnosticsCurrentHeapUsedCallback = - new chip::Callback::Callback( - ReadSoftwareDiagnosticsCurrentHeapUsed::OnAttributeResponse, this); - chip::Callback::Callback * - onReportSoftwareDiagnosticsCurrentHeapHighWatermarkCallback = - new chip::Callback::Callback( - ReadSoftwareDiagnosticsCurrentHeapHighWatermark::OnAttributeResponse, this); - chip::Callback::Callback * - onReportSoftwareDiagnosticsClusterRevisionCallback = - new chip::Callback::Callback( - ReadSoftwareDiagnosticsClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportSwitchNumberOfPositionsCallback = - new chip::Callback::Callback( - ReadSwitchNumberOfPositions::OnAttributeResponse, this); - chip::Callback::Callback * onReportSwitchCurrentPositionCallback = - new chip::Callback::Callback( - ReadSwitchCurrentPosition::OnAttributeResponse, this); - chip::Callback::Callback * onReportSwitchMultiPressMaxCallback = - new chip::Callback::Callback( - ReadSwitchMultiPressMax::OnAttributeResponse, this); - chip::Callback::Callback * onReportSwitchFeatureMapCallback = - new chip::Callback::Callback( - ReadSwitchFeatureMap::OnAttributeResponse, this); - chip::Callback::Callback * onReportSwitchClusterRevisionCallback = - new chip::Callback::Callback( - ReadSwitchClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTvChannelClusterRevisionCallback = - new chip::Callback::Callback( - ReadTvChannelClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTargetNavigatorClusterRevisionCallback = - new chip::Callback::Callback( - ReadTargetNavigatorClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTemperatureMeasurementMeasuredValueCallback = - new chip::Callback::Callback( - ReadTemperatureMeasurementMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTemperatureMeasurementMinMeasuredValueCallback = - new chip::Callback::Callback( - ReadTemperatureMeasurementMinMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTemperatureMeasurementMaxMeasuredValueCallback = - new chip::Callback::Callback( - ReadTemperatureMeasurementMaxMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTemperatureMeasurementToleranceCallback = - new chip::Callback::Callback( - ReadTemperatureMeasurementTolerance::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTemperatureMeasurementClusterRevisionCallback = - new chip::Callback::Callback( - ReadTemperatureMeasurementClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterBooleanCallback = - new chip::Callback::Callback( - ReadTestClusterBoolean::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterBitmap8Callback = - new chip::Callback::Callback( - ReadTestClusterBitmap8::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterBitmap16Callback = - new chip::Callback::Callback( - ReadTestClusterBitmap16::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterBitmap32Callback = - new chip::Callback::Callback( - ReadTestClusterBitmap32::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterBitmap64Callback = - new chip::Callback::Callback( - ReadTestClusterBitmap64::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt8uCallback = - new chip::Callback::Callback( - ReadTestClusterInt8u::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt16uCallback = - new chip::Callback::Callback( - ReadTestClusterInt16u::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt24uCallback = - new chip::Callback::Callback( - ReadTestClusterInt24u::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt32uCallback = - new chip::Callback::Callback( - ReadTestClusterInt32u::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt40uCallback = - new chip::Callback::Callback( - ReadTestClusterInt40u::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt48uCallback = - new chip::Callback::Callback( - ReadTestClusterInt48u::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt56uCallback = - new chip::Callback::Callback( - ReadTestClusterInt56u::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt64uCallback = - new chip::Callback::Callback( - ReadTestClusterInt64u::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt8sCallback = - new chip::Callback::Callback( - ReadTestClusterInt8s::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt16sCallback = - new chip::Callback::Callback( - ReadTestClusterInt16s::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt24sCallback = - new chip::Callback::Callback( - ReadTestClusterInt24s::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt32sCallback = - new chip::Callback::Callback( - ReadTestClusterInt32s::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt40sCallback = - new chip::Callback::Callback( - ReadTestClusterInt40s::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt48sCallback = - new chip::Callback::Callback( - ReadTestClusterInt48s::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt56sCallback = - new chip::Callback::Callback( - ReadTestClusterInt56s::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt64sCallback = - new chip::Callback::Callback( - ReadTestClusterInt64s::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterEnum8Callback = - new chip::Callback::Callback( - ReadTestClusterEnum8::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterEnum16Callback = - new chip::Callback::Callback( - ReadTestClusterEnum16::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterFloatSingleCallback = - new chip::Callback::Callback( - ReadTestClusterFloatSingle::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterFloatDoubleCallback = - new chip::Callback::Callback( - ReadTestClusterFloatDouble::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterOctetStringCallback = - new chip::Callback::Callback( - ReadTestClusterOctetString::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterLongOctetStringCallback = - new chip::Callback::Callback( - ReadTestClusterLongOctetString::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterCharStringCallback = - new chip::Callback::Callback( - ReadTestClusterCharString::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterLongCharStringCallback = - new chip::Callback::Callback( - ReadTestClusterLongCharString::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterEpochUsCallback = - new chip::Callback::Callback( - ReadTestClusterEpochUs::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterEpochSCallback = - new chip::Callback::Callback( - ReadTestClusterEpochS::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterVendorIdCallback = - new chip::Callback::Callback( - ReadTestClusterVendorId::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterEnumAttrCallback = - new chip::Callback::Callback( - ReadTestClusterEnumAttr::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterRangeRestrictedInt8uCallback = - new chip::Callback::Callback( - ReadTestClusterRangeRestrictedInt8u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterRangeRestrictedInt8sCallback = - new chip::Callback::Callback( - ReadTestClusterRangeRestrictedInt8s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterRangeRestrictedInt16uCallback = - new chip::Callback::Callback( - ReadTestClusterRangeRestrictedInt16u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterRangeRestrictedInt16sCallback = - new chip::Callback::Callback( - ReadTestClusterRangeRestrictedInt16s::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterUnsupportedCallback = - new chip::Callback::Callback( - ReadTestClusterUnsupported::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableBooleanCallback = - new chip::Callback::Callback( - ReadTestClusterNullableBoolean::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableBitmap8Callback = - new chip::Callback::Callback( - ReadTestClusterNullableBitmap8::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableBitmap16Callback = - new chip::Callback::Callback( - ReadTestClusterNullableBitmap16::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableBitmap32Callback = - new chip::Callback::Callback( - ReadTestClusterNullableBitmap32::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableBitmap64Callback = - new chip::Callback::Callback( - ReadTestClusterNullableBitmap64::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt8uCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt8u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt16uCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt16u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt24uCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt24u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt32uCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt32u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt40uCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt40u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt48uCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt48u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt56uCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt56u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt64uCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt64u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt8sCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt8s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt16sCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt16s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt24sCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt24s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt32sCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt32s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt40sCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt40s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt48sCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt48s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt56sCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt56s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt64sCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt64s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableEnum8Callback = - new chip::Callback::Callback( - ReadTestClusterNullableEnum8::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableEnum16Callback = - new chip::Callback::Callback( - ReadTestClusterNullableEnum16::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableFloatSingleCallback = - new chip::Callback::Callback( - ReadTestClusterNullableFloatSingle::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableFloatDoubleCallback = - new chip::Callback::Callback( - ReadTestClusterNullableFloatDouble::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableOctetStringCallback = - new chip::Callback::Callback( - ReadTestClusterNullableOctetString::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableCharStringCallback = - new chip::Callback::Callback( - ReadTestClusterNullableCharString::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableEnumAttrCallback = - new chip::Callback::Callback( - ReadTestClusterNullableEnumAttr::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableRangeRestrictedInt8uCallback = - new chip::Callback::Callback( - ReadTestClusterNullableRangeRestrictedInt8u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableRangeRestrictedInt8sCallback = - new chip::Callback::Callback( - ReadTestClusterNullableRangeRestrictedInt8s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableRangeRestrictedInt16uCallback = - new chip::Callback::Callback( - ReadTestClusterNullableRangeRestrictedInt16u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableRangeRestrictedInt16sCallback = - new chip::Callback::Callback( - ReadTestClusterNullableRangeRestrictedInt16s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterClusterRevisionCallback = - new chip::Callback::Callback( - ReadTestClusterClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatLocalTemperatureCallback = - new chip::Callback::Callback( - ReadThermostatLocalTemperature::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatAbsMinHeatSetpointLimitCallback = - new chip::Callback::Callback( - ReadThermostatAbsMinHeatSetpointLimit::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatAbsMaxHeatSetpointLimitCallback = - new chip::Callback::Callback( - ReadThermostatAbsMaxHeatSetpointLimit::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatAbsMinCoolSetpointLimitCallback = - new chip::Callback::Callback( - ReadThermostatAbsMinCoolSetpointLimit::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatAbsMaxCoolSetpointLimitCallback = - new chip::Callback::Callback( - ReadThermostatAbsMaxCoolSetpointLimit::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatOccupiedCoolingSetpointCallback = - new chip::Callback::Callback( - ReadThermostatOccupiedCoolingSetpoint::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatOccupiedHeatingSetpointCallback = - new chip::Callback::Callback( - ReadThermostatOccupiedHeatingSetpoint::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatMinHeatSetpointLimitCallback = - new chip::Callback::Callback( - ReadThermostatMinHeatSetpointLimit::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatMaxHeatSetpointLimitCallback = - new chip::Callback::Callback( - ReadThermostatMaxHeatSetpointLimit::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatMinCoolSetpointLimitCallback = - new chip::Callback::Callback( - ReadThermostatMinCoolSetpointLimit::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatMaxCoolSetpointLimitCallback = - new chip::Callback::Callback( - ReadThermostatMaxCoolSetpointLimit::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatMinSetpointDeadBandCallback = - new chip::Callback::Callback( - ReadThermostatMinSetpointDeadBand::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatControlSequenceOfOperationCallback = - new chip::Callback::Callback( - ReadThermostatControlSequenceOfOperation::OnAttributeResponse, this); - chip::Callback::Callback * onReportThermostatSystemModeCallback = - new chip::Callback::Callback( - ReadThermostatSystemMode::OnAttributeResponse, this); - chip::Callback::Callback * onReportThermostatStartOfWeekCallback = - new chip::Callback::Callback( - ReadThermostatStartOfWeek::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatNumberOfWeeklyTransitionsCallback = - new chip::Callback::Callback( - ReadThermostatNumberOfWeeklyTransitions::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatNumberOfDailyTransitionsCallback = - new chip::Callback::Callback( - ReadThermostatNumberOfDailyTransitions::OnAttributeResponse, this); - chip::Callback::Callback * onReportThermostatFeatureMapCallback = - new chip::Callback::Callback( - ReadThermostatFeatureMap::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatClusterRevisionCallback = - new chip::Callback::Callback( - ReadThermostatClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatUserInterfaceConfigurationTemperatureDisplayModeCallback = new chip::Callback::Callback( - ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatUserInterfaceConfigurationKeypadLockoutCallback = - new chip::Callback::Callback( - ReadThermostatUserInterfaceConfigurationKeypadLockout::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatUserInterfaceConfigurationScheduleProgrammingVisibilityCallback = new chip::Callback::Callback( - ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatUserInterfaceConfigurationClusterRevisionCallback = - new chip::Callback::Callback( - ReadThermostatUserInterfaceConfigurationClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsChannelCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsChannel::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRoutingRoleCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRoutingRole::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsNetworkNameCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsNetworkName::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsPanIdCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsPanId::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsExtendedPanIdCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsExtendedPanId::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsMeshLocalPrefixCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsMeshLocalPrefix::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsOverrunCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsOverrunCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsPartitionIdCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsPartitionId::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsWeightingCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsWeighting::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsDataVersionCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsDataVersion::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsStableDataVersionCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsStableDataVersion::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsLeaderRouterIdCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsLeaderRouterId::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsDetachedRoleCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsDetachedRoleCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsChildRoleCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsChildRoleCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRouterRoleCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRouterRoleCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsLeaderRoleCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsLeaderRoleCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsAttachAttemptCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsAttachAttemptCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsPartitionIdChangeCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsPartitionIdChangeCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsBetterPartitionAttachAttemptCountCallback = new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsParentChangeCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsParentChangeCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxTotalCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxTotalCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxUnicastCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxUnicastCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxBroadcastCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxBroadcastCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxAckRequestedCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxAckRequestedCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxAckedCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxAckedCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxNoAckRequestedCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxNoAckRequestedCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxDataCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxDataCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxDataPollCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxDataPollCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxBeaconCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxBeaconCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxBeaconRequestCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxBeaconRequestCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxOtherCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxOtherCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxRetryCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxRetryCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxErrCcaCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxErrCcaCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxErrAbortCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxErrAbortCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxErrBusyChannelCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxErrBusyChannelCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxTotalCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxTotalCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxUnicastCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxUnicastCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxBroadcastCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxBroadcastCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxDataCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxDataCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxDataPollCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxDataPollCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxBeaconCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxBeaconCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxBeaconRequestCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxBeaconRequestCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxOtherCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxOtherCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxAddressFilteredCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxAddressFilteredCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxDestAddrFilteredCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxDuplicatedCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxDuplicatedCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxErrNoFrameCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxErrNoFrameCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxErrUnknownNeighborCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxErrInvalidSrcAddrCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxErrSecCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxErrSecCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxErrFcsCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxErrFcsCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxErrOtherCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxErrOtherCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsActiveTimestampCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsActiveTimestamp::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsPendingTimestampCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsPendingTimestamp::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsDelayCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsDelay::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsChannelMaskCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsChannelMask::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsClusterRevisionCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWakeOnLanWakeOnLanMacAddressCallback = - new chip::Callback::Callback( - ReadWakeOnLanWakeOnLanMacAddress::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWakeOnLanClusterRevisionCallback = - new chip::Callback::Callback( - ReadWakeOnLanClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsBssidCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsBssid::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsSecurityTypeCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsSecurityType::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsWiFiVersionCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsWiFiVersion::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsChannelNumberCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsChannelNumber::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsRssiCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsRssi::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsBeaconLostCountCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsBeaconLostCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsBeaconRxCountCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsBeaconRxCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsPacketMulticastRxCountCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsPacketMulticastRxCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsPacketMulticastTxCountCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsPacketMulticastTxCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsPacketUnicastRxCountCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsPacketUnicastRxCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsPacketUnicastTxCountCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsPacketUnicastTxCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsCurrentMaxRateCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsCurrentMaxRate::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsOverrunCountCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsOverrunCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsClusterRevisionCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportWindowCoveringTypeCallback = - new chip::Callback::Callback( - ReadWindowCoveringType::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringCurrentPositionLiftCallback = - new chip::Callback::Callback( - ReadWindowCoveringCurrentPositionLift::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringCurrentPositionTiltCallback = - new chip::Callback::Callback( - ReadWindowCoveringCurrentPositionTilt::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringConfigStatusCallback = - new chip::Callback::Callback( - ReadWindowCoveringConfigStatus::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringCurrentPositionLiftPercentageCallback = - new chip::Callback::Callback( - ReadWindowCoveringCurrentPositionLiftPercentage::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringCurrentPositionTiltPercentageCallback = - new chip::Callback::Callback( - ReadWindowCoveringCurrentPositionTiltPercentage::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringOperationalStatusCallback = - new chip::Callback::Callback( - ReadWindowCoveringOperationalStatus::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringTargetPositionLiftPercent100thsCallback = - new chip::Callback::Callback( - ReadWindowCoveringTargetPositionLiftPercent100ths::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringTargetPositionTiltPercent100thsCallback = - new chip::Callback::Callback( - ReadWindowCoveringTargetPositionTiltPercent100ths::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringEndProductTypeCallback = - new chip::Callback::Callback( - ReadWindowCoveringEndProductType::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringCurrentPositionLiftPercent100thsCallback = - new chip::Callback::Callback( - ReadWindowCoveringCurrentPositionLiftPercent100ths::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringCurrentPositionTiltPercent100thsCallback = - new chip::Callback::Callback( - ReadWindowCoveringCurrentPositionTiltPercent100ths::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringInstalledOpenLimitLiftCallback = - new chip::Callback::Callback( - ReadWindowCoveringInstalledOpenLimitLift::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringInstalledClosedLimitLiftCallback = - new chip::Callback::Callback( - ReadWindowCoveringInstalledClosedLimitLift::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringInstalledOpenLimitTiltCallback = - new chip::Callback::Callback( - ReadWindowCoveringInstalledOpenLimitTilt::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringInstalledClosedLimitTiltCallback = - new chip::Callback::Callback( - ReadWindowCoveringInstalledClosedLimitTilt::OnAttributeResponse, this); - chip::Callback::Callback * onReportWindowCoveringModeCallback = - new chip::Callback::Callback( - ReadWindowCoveringMode::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringSafetyStatusCallback = - new chip::Callback::Callback( - ReadWindowCoveringSafetyStatus::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringFeatureMapCallback = - new chip::Callback::Callback( - ReadWindowCoveringFeatureMap::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringClusterRevisionCallback = - new chip::Callback::Callback( - ReadWindowCoveringClusterRevision::OnAttributeResponse, this); -}; - -void registerCommandsReporting(Commands & commands) -{ - const char * clusterName = "Reporting"; - - commands_list clusterCommands = { - make_unique(), - }; - - commands.Register(clusterName, clusterCommands); -} diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 1ace8321bb8565..0e489dfde8bbdd 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -128,7 +128,7 @@ class TestList : public Command printf("TV_WakeOnLanCluster\n"); printf("TV_ApplicationBasicCluster\n"); printf("TV_MediaPlaybackCluster\n"); - printf("TV_TvChannelCluster\n"); + printf("TV_ChannelCluster\n"); printf("TV_LowPowerCluster\n"); printf("TV_ContentLauncherCluster\n"); printf("TV_MediaInputCluster\n"); @@ -33673,10 +33673,10 @@ class TV_MediaPlaybackCluster : public TestCommand } }; -class TV_TvChannelCluster : public TestCommand +class TV_ChannelCluster : public TestCommand { public: - TV_TvChannelCluster() : TestCommand("TV_TvChannelCluster"), mTestIndex(0) {} + TV_ChannelCluster() : TestCommand("TV_ChannelCluster"), mTestIndex(0) {} /////////// TestCommand Interface ///////// void NextTest() override @@ -33685,12 +33685,12 @@ class TV_TvChannelCluster : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TV_TvChannelCluster\n"); + ChipLogProgress(chipTool, " **** Test Start: TV_ChannelCluster\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TV_TvChannelCluster\n"); + ChipLogProgress(chipTool, " **** Test Complete: TV_ChannelCluster\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -33708,8 +33708,8 @@ class TV_TvChannelCluster : public TestCommand err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute TV Channel list\n"); - err = TestReadAttributeTvChannelList_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute Channel list\n"); + err = TestReadAttributeChannelList_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Change Channel Command\n"); @@ -33738,15 +33738,14 @@ class TV_TvChannelCluster : public TestCommand static void OnFailureCallback_1(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_1(status); + (static_cast(context))->OnFailureResponse_1(status); } static void OnSuccessCallback_1( void * context, - const chip::app::DataModel::DecodableList & - channelList) + const chip::app::DataModel::DecodableList & channelList) { - (static_cast(context))->OnSuccessResponse_1(channelList); + (static_cast(context))->OnSuccessResponse_1(channelList); } // @@ -33759,13 +33758,13 @@ class TV_TvChannelCluster : public TestCommand return WaitForCommissionee(); } - CHIP_ERROR TestReadAttributeTvChannelList_1() + CHIP_ERROR TestReadAttributeChannelList_1() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - chip::Controller::TvChannelClusterTest cluster; + chip::Controller::ChannelClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_1, OnFailureCallback_1)); return CHIP_NO_ERROR; } @@ -33773,8 +33772,7 @@ class TV_TvChannelCluster : public TestCommand void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } void OnSuccessResponse_1( - const chip::app::DataModel::DecodableList & - channelList) + const chip::app::DataModel::DecodableList & channelList) { auto iter = channelList.begin(); VerifyOrReturn(CheckNextListItemDecodes("channelList", iter, 0)); @@ -33799,17 +33797,17 @@ class TV_TvChannelCluster : public TestCommand CHIP_ERROR TestChangeChannelCommand_2() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TvChannel::Commands::ChangeChannel::Type; + using RequestType = chip::app::Clusters::Channel::Commands::ChangeChannel::Type; RequestType request; request.match = chip::Span("CNNgarbage: not in length on purpose", 3); auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_2(data.channelMatch, data.errorType); + (static_cast(context))->OnSuccessResponse_2(data.channelMatch, data.errorType); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_2(status); + (static_cast(context))->OnFailureResponse_2(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); @@ -33818,8 +33816,8 @@ class TV_TvChannelCluster : public TestCommand void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2(const chip::app::Clusters::TvChannel::Structs::TvChannelInfo::DecodableType & channelMatch, - chip::app::Clusters::TvChannel::TvChannelErrorType errorType) + void OnSuccessResponse_2(const chip::app::Clusters::Channel::Structs::ChannelInfo::DecodableType & channelMatch, + chip::app::Clusters::Channel::ChannelErrorType errorType) { VerifyOrReturn(CheckValue("channelMatch.majorNumber", channelMatch.majorNumber, 1U)); VerifyOrReturn(CheckValue("channelMatch.minorNumber", channelMatch.minorNumber, 0U)); @@ -33836,18 +33834,18 @@ class TV_TvChannelCluster : public TestCommand CHIP_ERROR TestChangeChannelByNumberCommand_3() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TvChannel::Commands::ChangeChannelByNumber::Type; + using RequestType = chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type; RequestType request; request.majorNumber = 1U; request.minorNumber = 2U; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_3(); + (static_cast(context))->OnSuccessResponse_3(); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_3(status); + (static_cast(context))->OnFailureResponse_3(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); @@ -33861,17 +33859,17 @@ class TV_TvChannelCluster : public TestCommand CHIP_ERROR TestSkipChannelCommand_4() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TvChannel::Commands::SkipChannel::Type; + using RequestType = chip::app::Clusters::Channel::Commands::SkipChannel::Type; RequestType request; request.count = 1U; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_4(); + (static_cast(context))->OnSuccessResponse_4(); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_4(status); + (static_cast(context))->OnFailureResponse_4(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); @@ -56670,7 +56668,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp index cd395f2a08fca2..2e9d8d2ba96da4 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp @@ -532,6 +532,48 @@ void BridgedDeviceBasicClusterAttributeListListAttributeFilter(TLV::TLVReader * cb->mCall(cb->mContext, list); } +void ChannelClusterChannelListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void ChannelClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + void ColorControlClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { @@ -1726,48 +1768,6 @@ void SwitchClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Cal cb->mCall(cb->mContext, list); } -void TvChannelClusterChannelListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - chip::app::DataModel::DecodableList list; - CHIP_ERROR err = Decode(*tlvData, list); - if (err != CHIP_NO_ERROR) - { - if (onFailureCallback != nullptr) - { - Callback::Callback * cb = - Callback::Callback::FromCancelable(onFailureCallback); - cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); - } - return; - } - - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); - cb->mCall(cb->mContext, list); -} - -void TvChannelClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - chip::app::DataModel::DecodableList list; - CHIP_ERROR err = Decode(*tlvData, list); - if (err != CHIP_NO_ERROR) - { - if (onFailureCallback != nullptr) - { - Callback::Callback * cb = - Callback::Callback::FromCancelable(onFailureCallback); - cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); - } - return; - } - - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); - cb->mCall(cb->mContext, list); -} - void TargetNavigatorClusterTargetNavigatorListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) @@ -2284,6 +2284,22 @@ bool emberAfApplicationLauncherClusterStopAppResponseCallback(EndpointId endpoin return true; } +bool emberAfChannelClusterChangeChannelResponseCallback( + EndpointId endpoint, app::CommandSender * commandObj, + chip::app::Clusters::Channel::Structs::ChannelInfo::DecodableType channelMatch, uint8_t errorType) +{ + ChipLogProgress(Zcl, "ChangeChannelResponse:"); + ChipLogProgress(Zcl, " channelMatch: Not sure how to log struct ChannelInfo"); + ChipLogProgress(Zcl, " errorType: %" PRIu8 "", errorType); + + GET_CLUSTER_RESPONSE_CALLBACKS("ChannelClusterChangeChannelResponseCallback"); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, ChannelInfo(), errorType); + return true; +} + bool emberAfContentLauncherClusterLaunchContentResponseCallback(EndpointId endpoint, app::CommandSender * commandObj, uint8_t contentLaunchStatus, chip::CharSpan data) { @@ -2934,22 +2950,6 @@ bool emberAfScenesClusterViewSceneResponseCallback(EndpointId endpoint, app::Com return true; } -bool emberAfTvChannelClusterChangeChannelResponseCallback( - EndpointId endpoint, app::CommandSender * commandObj, - chip::app::Clusters::TvChannel::Structs::TvChannelInfo::DecodableType channelMatch, uint8_t errorType) -{ - ChipLogProgress(Zcl, "ChangeChannelResponse:"); - ChipLogProgress(Zcl, " channelMatch: Not sure how to log struct TvChannelInfo"); - ChipLogProgress(Zcl, " errorType: %" PRIu8 "", errorType); - - GET_CLUSTER_RESPONSE_CALLBACKS("TvChannelClusterChangeChannelResponseCallback"); - - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); - cb->mCall(cb->mContext, TvChannelInfo(), errorType); - return true; -} - bool emberAfTargetNavigatorClusterNavigateTargetResponseCallback(EndpointId endpoint, app::CommandSender * commandObj, uint8_t status, chip::CharSpan data) { diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h index 6114dffd77005c..c7620fc2e98ab8 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h @@ -39,6 +39,7 @@ typedef void (*AccountLoginClusterGetSetupPINResponseCallback)(void * context, c typedef void (*ApplicationLauncherClusterHideAppResponseCallback)(void * context, uint8_t status, chip::CharSpan data); typedef void (*ApplicationLauncherClusterLaunchAppResponseCallback)(void * context, uint8_t status, chip::CharSpan data); typedef void (*ApplicationLauncherClusterStopAppResponseCallback)(void * context, uint8_t status, chip::CharSpan data); +typedef void (*ChannelClusterChangeChannelResponseCallback)(void * context, ChannelInfo channelMatch, uint8_t errorType); typedef void (*ContentLauncherClusterLaunchContentResponseCallback)(void * context, uint8_t contentLaunchStatus, chip::CharSpan data); typedef void (*ContentLauncherClusterLaunchURLResponseCallback)(void * context, uint8_t contentLaunchStatus, chip::CharSpan data); @@ -107,7 +108,6 @@ typedef void (*ScenesClusterStoreSceneResponseCallback)(void * context, uint8_t typedef void (*ScenesClusterViewSceneResponseCallback)(void * context, uint8_t status, uint16_t groupId, uint8_t sceneId, uint16_t transitionTime, chip::CharSpan sceneName, /* TYPE WARNING: array array defaults to */ uint8_t * extensionFieldSets); -typedef void (*TvChannelClusterChangeChannelResponseCallback)(void * context, TvChannelInfo channelMatch, uint8_t errorType); typedef void (*TargetNavigatorClusterNavigateTargetResponseCallback)(void * context, uint8_t status, chip::CharSpan data); typedef void (*TestClusterClusterBooleanResponseCallback)(void * context, bool value); typedef void (*TestClusterClusterSimpleStructResponseCallback)(void * context, SimpleStruct arg1); @@ -222,6 +222,15 @@ void BridgedDeviceBasicClusterAttributeListListAttributeFilter(chip::TLV::TLVRea chip::Callback::Cancelable * onFailureCallback); typedef void (*BridgedDeviceBasicAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void ChannelClusterChannelListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ChannelChannelListListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +void ChannelClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ChannelAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); void ColorControlClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); @@ -497,15 +506,6 @@ void SwitchClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onFailureCallback); typedef void (*SwitchAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void TvChannelClusterChannelListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); -typedef void (*TvChannelChannelListListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -void TvChannelClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); -typedef void (*TvChannelAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); void TargetNavigatorClusterTargetNavigatorListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp index 5bdde9ec2de968..9ec6e07c5e802c 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp @@ -1317,6 +1317,132 @@ CHIP_ERROR BridgedActionsCluster::StopAction(Callback::Cancelable * onSuccessCal // BridgedDeviceBasic Cluster Commands +// Channel Cluster Commands +CHIP_ERROR ChannelCluster::ChangeChannel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::CharSpan match) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Channel::Commands::ChangeChannel::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // match: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), match)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR ChannelCluster::ChangeChannelByNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t majorNumber, uint16_t minorNumber) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Channel::Commands::ChangeChannelByNumber::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // majorNumber: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), majorNumber)); + // minorNumber: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), minorNumber)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR ChannelCluster::SkipChannel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t count) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Channel::Commands::SkipChannel::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // count: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), count)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + // ColorControl Cluster Commands CHIP_ERROR ColorControlCluster::ColorLoopSet(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t updateFlags, uint8_t action, uint8_t direction, uint16_t time, @@ -5866,133 +5992,6 @@ CHIP_ERROR SoftwareDiagnosticsCluster::ResetWatermarks(Callback::Cancelable * on // Switch Cluster Commands -// TvChannel Cluster Commands -CHIP_ERROR TvChannelCluster::ChangeChannel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - chip::CharSpan match) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TvChannel::Commands::ChangeChannel::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // match: charString - SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), match)); - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -CHIP_ERROR TvChannelCluster::ChangeChannelByNumber(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t majorNumber, - uint16_t minorNumber) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TvChannel::Commands::ChangeChannelByNumber::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // majorNumber: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), majorNumber)); - // minorNumber: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), minorNumber)); - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -CHIP_ERROR TvChannelCluster::SkipChannel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t count) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TvChannel::Commands::SkipChannel::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // count: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), count)); - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - // TargetNavigator Cluster Commands CHIP_ERROR TargetNavigatorCluster::NavigateTarget(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t target, chip::CharSpan data) diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h index 8941ab09228115..9deb174f1d33fb 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h @@ -192,6 +192,20 @@ class DLL_EXPORT BridgedDeviceBasicCluster : public ClusterBase ~BridgedDeviceBasicCluster() {} }; +class DLL_EXPORT ChannelCluster : public ClusterBase +{ +public: + ChannelCluster() : ClusterBase(app::Clusters::Channel::Id) {} + ~ChannelCluster() {} + + // Cluster Commands + CHIP_ERROR ChangeChannel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::CharSpan match); + CHIP_ERROR ChangeChannelByNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t majorNumber, uint16_t minorNumber); + CHIP_ERROR SkipChannel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t count); +}; + class DLL_EXPORT ColorControlCluster : public ClusterBase { public: @@ -672,20 +686,6 @@ class DLL_EXPORT SwitchCluster : public ClusterBase ~SwitchCluster() {} }; -class DLL_EXPORT TvChannelCluster : public ClusterBase -{ -public: - TvChannelCluster() : ClusterBase(app::Clusters::TvChannel::Id) {} - ~TvChannelCluster() {} - - // Cluster Commands - CHIP_ERROR ChangeChannel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - chip::CharSpan match); - CHIP_ERROR ChangeChannelByNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t majorNumber, uint16_t minorNumber); - CHIP_ERROR SkipChannel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t count); -}; - class DLL_EXPORT TargetNavigatorCluster : public ClusterBase { public: diff --git a/zzz_generated/controller-clusters/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/controller-clusters/zap-generated/IMClusterCommandHandler.cpp index 728e686b0b7924..23d9730fcf9790 100644 --- a/zzz_generated/controller-clusters/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/controller-clusters/zap-generated/IMClusterCommandHandler.cpp @@ -365,6 +365,108 @@ void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPa } // namespace ApplicationLauncher +namespace Channel { + +void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV + // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. + // Any error value TLVUnpackError means we have received an illegal value. + // The following variables are used for all commands to save code size. + CHIP_ERROR TLVError = CHIP_NO_ERROR; + CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; + uint32_t validArgumentCount = 0; + uint32_t expectArgumentCount = 0; + uint32_t currentDecodeTagId = 0; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::ChangeChannelResponse::Id: { + expectArgumentCount = 2; + chip::app::Clusters::Channel::Structs::ChannelInfo::DecodableType channelMatch; + uint8_t errorType; + bool argExists[2]; + + memset(argExists, 0, sizeof argExists); + + while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) + { + // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. + // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. + if (!TLV::IsContextTag(aDataTlv.GetTag())) + { + continue; + } + currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); + if (currentDecodeTagId < 2) + { + if (argExists[currentDecodeTagId]) + { + ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); + TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; + break; + } + else + { + argExists[currentDecodeTagId] = true; + validArgumentCount++; + } + } + switch (currentDecodeTagId) + { + case 0: + // Not supported, just error out. + TLVUnpackError = CHIP_ERROR_UNEXPECTED_TLV_ELEMENT; + break; + case 1: + TLVUnpackError = aDataTlv.Get(errorType); + break; + default: + // Unsupported tag, ignore it. + ChipLogProgress(Zcl, "Unknown TLV tag during processing."); + break; + } + if (CHIP_NO_ERROR != TLVUnpackError) + { + break; + } + } + + if (CHIP_END_OF_TLV == TLVError) + { + // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. + TLVError = CHIP_NO_ERROR; + } + + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) + { + wasHandled = emberAfChannelClusterChangeChannelResponseCallback(aCommandPath.mEndpointId, apCommandObj, + channelMatch, errorType); + } + break; + } + default: { + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || CHIP_NO_ERROR != TLVUnpackError || expectArgumentCount != validArgumentCount || !wasHandled) + { + ChipLogProgress(Zcl, + "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT + ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32, + validArgumentCount, expectArgumentCount, TLVError.Format(), TLVUnpackError.Format(), currentDecodeTagId); + // A command with no arguments would never write currentDecodeTagId. If + // progress logging is also disabled, it would look unused. Silence that + // warning. + UNUSED_VAR(currentDecodeTagId); + } +} + +} // namespace Channel + namespace ContentLauncher { void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -3485,108 +3587,6 @@ void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPa } // namespace Scenes -namespace TvChannel { - -void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) -{ - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - // The following variables are used for all commands to save code size. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint32_t validArgumentCount = 0; - uint32_t expectArgumentCount = 0; - uint32_t currentDecodeTagId = 0; - bool wasHandled = false; - { - switch (aCommandPath.mCommandId) - { - case Commands::ChangeChannelResponse::Id: { - expectArgumentCount = 2; - chip::app::Clusters::TvChannel::Structs::TvChannelInfo::DecodableType channelMatch; - uint8_t errorType; - bool argExists[2]; - - memset(argExists, 0, sizeof argExists); - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. - // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. - if (!TLV::IsContextTag(aDataTlv.GetTag())) - { - continue; - } - currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); - if (currentDecodeTagId < 2) - { - if (argExists[currentDecodeTagId]) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - else - { - argExists[currentDecodeTagId] = true; - validArgumentCount++; - } - } - switch (currentDecodeTagId) - { - case 0: - // Not supported, just error out. - TLVUnpackError = CHIP_ERROR_UNEXPECTED_TLV_ELEMENT; - break; - case 1: - TLVUnpackError = aDataTlv.Get(errorType); - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (CHIP_NO_ERROR != TLVUnpackError) - { - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) - { - wasHandled = emberAfTvChannelClusterChangeChannelResponseCallback(aCommandPath.mEndpointId, apCommandObj, - channelMatch, errorType); - } - break; - } - default: { - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || CHIP_NO_ERROR != TLVUnpackError || expectArgumentCount != validArgumentCount || !wasHandled) - { - ChipLogProgress(Zcl, - "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT - ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32, - validArgumentCount, expectArgumentCount, TLVError.Format(), TLVUnpackError.Format(), currentDecodeTagId); - // A command with no arguments would never write currentDecodeTagId. If - // progress logging is also disabled, it would look unused. Silence that - // warning. - UNUSED_VAR(currentDecodeTagId); - } -} - -} // namespace TvChannel - namespace TargetNavigator { void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -4377,6 +4377,9 @@ void DispatchSingleClusterResponseCommand(const ConcreteCommandPath & aCommandPa case Clusters::ApplicationLauncher::Id: Clusters::ApplicationLauncher::DispatchClientCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::Channel::Id: + Clusters::Channel::DispatchClientCommand(apCommandObj, aCommandPath, aReader); + break; case Clusters::ContentLauncher::Id: Clusters::ContentLauncher::DispatchClientCommand(apCommandObj, aCommandPath, aReader); break; @@ -4413,9 +4416,6 @@ void DispatchSingleClusterResponseCommand(const ConcreteCommandPath & aCommandPa case Clusters::Scenes::Id: Clusters::Scenes::DispatchClientCommand(apCommandObj, aCommandPath, aReader); break; - case Clusters::TvChannel::Id: - Clusters::TvChannel::DispatchClientCommand(apCommandObj, aCommandPath, aReader); - break; case Clusters::TargetNavigator::Id: Clusters::TargetNavigator::DispatchClientCommand(apCommandObj, aCommandPath, aReader); break; diff --git a/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h index 2f85009baab323..58ad4eee403386 100644 --- a/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h @@ -35,6 +35,7 @@ MatterBooleanStatePluginClientInitCallback(); \ MatterBridgedActionsPluginClientInitCallback(); \ MatterBridgedDeviceBasicPluginClientInitCallback(); \ + MatterChannelPluginClientInitCallback(); \ MatterColorControlPluginClientInitCallback(); \ MatterContentLauncherPluginClientInitCallback(); \ MatterDescriptorPluginClientInitCallback(); \ @@ -71,7 +72,6 @@ MatterScenesPluginClientInitCallback(); \ MatterSoftwareDiagnosticsPluginClientInitCallback(); \ MatterSwitchPluginClientInitCallback(); \ - MatterTvChannelPluginClientInitCallback(); \ MatterTargetNavigatorPluginClientInitCallback(); \ MatterTemperatureMeasurementPluginClientInitCallback(); \ MatterTestClusterPluginClientInitCallback(); \ diff --git a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp index cce54b227edfd6..105f048289f12a 100644 --- a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp +++ b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp @@ -68,6 +68,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID: emberAfBridgedDeviceBasicClusterInitCallback(endpoint); break; + case ZCL_CHANNEL_CLUSTER_ID: + emberAfChannelClusterInitCallback(endpoint); + break; case ZCL_COLOR_CONTROL_CLUSTER_ID: emberAfColorControlClusterInitCallback(endpoint); break; @@ -176,9 +179,6 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_SWITCH_CLUSTER_ID: emberAfSwitchClusterInitCallback(endpoint); break; - case ZCL_TV_CHANNEL_CLUSTER_ID: - emberAfTvChannelClusterInitCallback(endpoint); - break; case ZCL_TARGET_NAVIGATOR_CLUSTER_ID: emberAfTargetNavigatorClusterInitCallback(endpoint); break; @@ -280,6 +280,11 @@ void __attribute__((weak)) emberAfBridgedDeviceBasicClusterInitCallback(Endpoint // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfChannelClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfColorControlClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -460,11 +465,6 @@ void __attribute__((weak)) emberAfSwitchClusterInitCallback(EndpointId endpoint) // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfTvChannelClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfTargetNavigatorClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h index ca02d5ae2a8fb7..b595a44c43dc83 100644 --- a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h +++ b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h @@ -271,7 +271,7 @@ /* Endpoint: 1, Cluster: Wake on LAN (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ - /* Endpoint: 1, Cluster: TV Channel (client) */ \ + /* Endpoint: 1, Cluster: Channel (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (client) */ \ @@ -450,7 +450,7 @@ }, /* Endpoint: 1, Cluster: Wake on LAN (client) */ \ { \ 0x0504, ZAP_ATTRIBUTE_INDEX(51), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ - }, /* Endpoint: 1, Cluster: TV Channel (client) */ \ + }, /* Endpoint: 1, Cluster: Channel (client) */ \ { \ 0x0505, ZAP_ATTRIBUTE_INDEX(52), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (client) */ \ diff --git a/zzz_generated/controller-clusters/zap-generated/gen_config.h b/zzz_generated/controller-clusters/zap-generated/gen_config.h index 0a03eeaa82080d..1a538867128128 100644 --- a/zzz_generated/controller-clusters/zap-generated/gen_config.h +++ b/zzz_generated/controller-clusters/zap-generated/gen_config.h @@ -42,6 +42,7 @@ #define EMBER_AF_BOOLEAN_STATE_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_BRIDGED_ACTIONS_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_BRIDGED_DEVICE_BASIC_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_CHANNEL_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_COLOR_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_CONTENT_LAUNCH_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_DESCRIPTOR_CLUSTER_CLIENT_ENDPOINT_COUNT (1) @@ -78,7 +79,6 @@ #define EMBER_AF_SCENES_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_SOFTWARE_DIAGNOSTICS_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_SWITCH_CLUSTER_CLIENT_ENDPOINT_COUNT (1) -#define EMBER_AF_TV_CHANNEL_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_TARGET_NAVIGATOR_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_TEMP_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_TEST_CLUSTER_CLIENT_ENDPOINT_COUNT (1) @@ -144,6 +144,10 @@ #define ZCL_USING_BRIDGED_DEVICE_BASIC_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_BRIDGED_DEVICE_BASIC_CLIENT +// Use this macro to check if the client side of the Channel cluster is included +#define ZCL_USING_CHANNEL_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_CHANNEL_CLIENT + // Use this macro to check if the client side of the Color Control cluster is included #define ZCL_USING_COLOR_CONTROL_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_COLOR_CONTROL_CLIENT @@ -288,10 +292,6 @@ #define ZCL_USING_SWITCH_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_SWITCH_CLIENT -// Use this macro to check if the client side of the TV Channel cluster is included -#define ZCL_USING_TV_CHANNEL_CLUSTER_CLIENT -#define EMBER_AF_PLUGIN_TV_CHANNEL_CLIENT - // Use this macro to check if the client side of the Target Navigator cluster is included #define ZCL_USING_TARGET_NAVIGATOR_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_TARGET_NAVIGATOR_CLIENT diff --git a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h index 7ef1a5c5c1e4c7..8733079a01b4f4 100644 --- a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h +++ b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h @@ -115,6 +115,13 @@ class DLL_EXPORT BridgedDeviceBasicClusterTest : public BridgedDeviceBasicCluste ~BridgedDeviceBasicClusterTest() {} }; +class DLL_EXPORT ChannelClusterTest : public ChannelCluster +{ +public: + ChannelClusterTest() : ChannelCluster() {} + ~ChannelClusterTest() {} +}; + class DLL_EXPORT ColorControlClusterTest : public ColorControlCluster { public: @@ -367,13 +374,6 @@ class DLL_EXPORT SwitchClusterTest : public SwitchCluster ~SwitchClusterTest() {} }; -class DLL_EXPORT TvChannelClusterTest : public TvChannelCluster -{ -public: - TvChannelClusterTest() : TvChannelCluster() {} - ~TvChannelClusterTest() {} -}; - class DLL_EXPORT TargetNavigatorClusterTest : public TargetNavigatorCluster { public: diff --git a/zzz_generated/tv-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/tv-app/zap-generated/IMClusterCommandHandler.cpp index 586b0a43914a6f..b7e5b1ebe1e6d9 100644 --- a/zzz_generated/tv-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/tv-app/zap-generated/IMClusterCommandHandler.cpp @@ -373,6 +373,65 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace Binding +namespace Channel { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV + // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. + // Any error value TLVUnpackError means we have received an illegal value. + // The following variables are used for all commands to save code size. + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::ChangeChannel::Id: { + Commands::ChangeChannel::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfChannelClusterChangeChannelCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::ChangeChannelByNumber::Id: { + Commands::ChangeChannelByNumber::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfChannelClusterChangeChannelByNumberCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::SkipChannel::Id: { + Commands::SkipChannel::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfChannelClusterSkipChannelCallback(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()); + } +} + +} // namespace Channel + namespace ContentLauncher { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -1992,65 +2051,6 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace OperationalCredentials -namespace TvChannel { - -void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) -{ - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - // The following variables are used for all commands to save code size. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - bool wasHandled = false; - { - switch (aCommandPath.mCommandId) - { - case Commands::ChangeChannel::Id: { - Commands::ChangeChannel::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfTvChannelClusterChangeChannelCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::ChangeChannelByNumber::Id: { - Commands::ChangeChannelByNumber::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfTvChannelClusterChangeChannelByNumberCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::SkipChannel::Id: { - Commands::SkipChannel::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfTvChannelClusterSkipChannelCallback(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()); - } -} - -} // namespace TvChannel - namespace TargetNavigator { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -2121,6 +2121,9 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::Binding::Id: Clusters::Binding::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::Channel::Id: + Clusters::Channel::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; case Clusters::ContentLauncher::Id: Clusters::ContentLauncher::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; @@ -2157,9 +2160,6 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::OperationalCredentials::Id: Clusters::OperationalCredentials::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; - case Clusters::TvChannel::Id: - Clusters::TvChannel::DispatchServerCommand(apCommandObj, aCommandPath, aReader); - break; case Clusters::TargetNavigator::Id: Clusters::TargetNavigator::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; diff --git a/zzz_generated/tv-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/tv-app/zap-generated/PluginApplicationCallbacks.h index 3a08594996df75..dd0d51a216419f 100644 --- a/zzz_generated/tv-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/tv-app/zap-generated/PluginApplicationCallbacks.h @@ -29,6 +29,7 @@ MatterAudioOutputPluginServerInitCallback(); \ MatterBasicPluginServerInitCallback(); \ MatterBindingPluginServerInitCallback(); \ + MatterChannelPluginServerInitCallback(); \ MatterContentLauncherPluginServerInitCallback(); \ MatterDescriptorPluginServerInitCallback(); \ MatterDiagnosticLogsPluginServerInitCallback(); \ @@ -51,7 +52,6 @@ MatterOperationalCredentialsPluginServerInitCallback(); \ MatterRelativeHumidityMeasurementPluginServerInitCallback(); \ MatterSoftwareDiagnosticsPluginServerInitCallback(); \ - MatterTvChannelPluginServerInitCallback(); \ MatterTargetNavigatorPluginServerInitCallback(); \ MatterThreadNetworkDiagnosticsPluginServerInitCallback(); \ MatterUserLabelPluginServerInitCallback(); \ diff --git a/zzz_generated/tv-app/zap-generated/attribute-size.cpp b/zzz_generated/tv-app/zap-generated/attribute-size.cpp deleted file mode 100644 index 6007186b1d689f..00000000000000 --- a/zzz_generated/tv-app/zap-generated/attribute-size.cpp +++ /dev/null @@ -1,1022 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -#include -#include -#include -#include -#include -#include -#include - -using namespace chip; -using namespace chip::app::List; - -// The first 2 bytes specify the number of entries. A value of 0xFFFF means the list in invalid -// and data is undefined. -constexpr uint16_t kSizeLengthInBytes = 2u; - -void copyListMember(uint8_t * dest, uint8_t * src, bool write, uint16_t * offset, uint16_t length) -{ - if (write) - { - memmove(dest + *offset, src, length); - } - else - { - memmove(dest, src + *offset, length); - } - - *offset = static_cast(*offset + length); -} - -uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, bool write, uint8_t * dest, uint8_t * src, - int32_t index) -{ - if (index == -1) - { - memmove(dest, src, am->size); - return am->size; - } - - if (index == 0) - { - if (write) - { - // src is a pointer to native-endian uint16_t, dest is pointer to buffer that should hold little-endian value - emberAfCopyInt16u(dest, 0, *reinterpret_cast(src)); - } - else - { - // src is pointer to buffer holding little-endian value, dest is a pointer to native-endian uint16_t - *reinterpret_cast(dest) = emberAfGetInt16u(src, 0, kSizeLengthInBytes); - } - return kSizeLengthInBytes; - } - - if (!CanCastTo(index)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Should be between 1 and 65534", index); - return 0; - } - - uint16_t entryLength = 0; - switch (clusterId) - { - case 0x050D: // Application Basic Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0007: // allowed vendor list - { - entryLength = 2; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - copyListMember(dest, src, write, &entryOffset, entryLength); // INT16U - break; - } - } - break; - } - case 0x050C: // Application Launcher Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // application launcher list - { - entryLength = 2; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - copyListMember(dest, src, write, &entryOffset, entryLength); // INT16U - break; - } - } - break; - } - case 0x050B: // Audio Output Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // audio output list - { - entryLength = 36; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _AudioOutputInfo - _AudioOutputInfo * entry = reinterpret_cast<_AudioOutputInfo *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->index, write ? (uint8_t *) &entry->index : src, write, &entryOffset, - sizeof(entry->index)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->outputType, write ? (uint8_t *) &entry->outputType : src, write, - &entryOffset, sizeof(entry->outputType)); // AudioOutputType - ByteSpan nameSpanStorage(Uint8::from_const_char(entry->name.data()), entry->name.size()); // CHAR_STRING - ByteSpan * nameSpan = &nameSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 34, nameSpan) : ReadByteSpan(src + entryOffset, 34, nameSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 34); - break; - } - } - break; - } - case 0x050A: // Content Launcher Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // accept header list - { - entryOffset = GetByteSpanOffsetFromIndex(write ? dest : src, am->size, static_cast(index - 1)); - if (entryOffset == 0) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - - ByteSpan * acceptHeaderListSpan = reinterpret_cast(write ? src : dest); // OCTET_STRING - uint16_t acceptHeaderListRemainingSpace = static_cast(am->size - entryOffset); - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, acceptHeaderListRemainingSpace, acceptHeaderListSpan) - : ReadByteSpan(src + entryOffset, acceptHeaderListRemainingSpace, acceptHeaderListSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - - if (!CanCastTo(acceptHeaderListSpan->size())) - { - ChipLogError(Zcl, "Span size %zu is too large", acceptHeaderListSpan->size()); - return 0; - } - entryLength = static_cast(acceptHeaderListSpan->size()); - break; - } - } - break; - } - case 0x001D: // Descriptor Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // device list - { - entryLength = 6; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _DeviceType - _DeviceType * entry = reinterpret_cast<_DeviceType *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->type, write ? (uint8_t *) &entry->type : src, write, &entryOffset, - sizeof(entry->type)); // DEVTYPE_ID - copyListMember(write ? dest : (uint8_t *) &entry->revision, write ? (uint8_t *) &entry->revision : src, write, - &entryOffset, sizeof(entry->revision)); // INT16U - break; - } - case 0x0001: // server list - { - entryLength = 4; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - copyListMember(dest, src, write, &entryOffset, entryLength); // CLUSTER_ID - break; - } - case 0x0002: // client list - { - entryLength = 4; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - copyListMember(dest, src, write, &entryOffset, entryLength); // CLUSTER_ID - break; - } - case 0x0003: // parts list - { - entryLength = 2; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - copyListMember(dest, src, write, &entryOffset, entryLength); // ENDPOINT_NO - break; - } - } - break; - } - case 0x0030: // General Commissioning Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0001: // BasicCommissioningInfoList - { - entryLength = 4; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _BasicCommissioningInfoType - _BasicCommissioningInfoType * entry = reinterpret_cast<_BasicCommissioningInfoType *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->FailSafeExpiryLengthMs, - write ? (uint8_t *) &entry->FailSafeExpiryLengthMs : src, write, &entryOffset, - sizeof(entry->FailSafeExpiryLengthMs)); // INT32U - break; - } - } - break; - } - case 0x0033: // General Diagnostics Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // NetworkInterfaces - { - entryLength = 48; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _NetworkInterfaceType - _NetworkInterfaceType * entry = reinterpret_cast<_NetworkInterfaceType *>(write ? src : dest); - ByteSpan NameSpanStorage(Uint8::from_const_char(entry->Name.data()), entry->Name.size()); // CHAR_STRING - ByteSpan * NameSpan = &NameSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 34, NameSpan) : ReadByteSpan(src + entryOffset, 34, NameSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 34); - copyListMember(write ? dest : (uint8_t *) &entry->FabricConnected, write ? (uint8_t *) &entry->FabricConnected : src, - write, &entryOffset, sizeof(entry->FabricConnected)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->OffPremiseServicesReachableIPv4, - write ? (uint8_t *) &entry->OffPremiseServicesReachableIPv4 : src, write, &entryOffset, - sizeof(entry->OffPremiseServicesReachableIPv4)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->OffPremiseServicesReachableIPv6, - write ? (uint8_t *) &entry->OffPremiseServicesReachableIPv6 : src, write, &entryOffset, - sizeof(entry->OffPremiseServicesReachableIPv6)); // BOOLEAN - ByteSpan * HardwareAddressSpan = &entry->HardwareAddress; // OCTET_STRING - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 10, HardwareAddressSpan) - : ReadByteSpan(src + entryOffset, 10, HardwareAddressSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 10); - copyListMember(write ? dest : (uint8_t *) &entry->Type, write ? (uint8_t *) &entry->Type : src, write, &entryOffset, - sizeof(entry->Type)); // InterfaceType - break; - } - case 0x0005: // ActiveHardwareFaults - { - entryLength = 1; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - copyListMember(dest, src, write, &entryOffset, entryLength); // ENUM8 - break; - } - case 0x0006: // ActiveRadioFaults - { - entryLength = 1; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - copyListMember(dest, src, write, &entryOffset, entryLength); // ENUM8 - break; - } - case 0x0007: // ActiveNetworkFaults - { - entryLength = 1; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - copyListMember(dest, src, write, &entryOffset, entryLength); // ENUM8 - break; - } - } - break; - } - case 0x003F: // Group Key Management Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // groups - { - entryLength = 6; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _GroupState - _GroupState * entry = reinterpret_cast<_GroupState *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->VendorId, write ? (uint8_t *) &entry->VendorId : src, write, - &entryOffset, sizeof(entry->VendorId)); // INT16U - copyListMember(write ? dest : (uint8_t *) &entry->VendorGroupId, write ? (uint8_t *) &entry->VendorGroupId : src, write, - &entryOffset, sizeof(entry->VendorGroupId)); // INT16U - copyListMember(write ? dest : (uint8_t *) &entry->GroupKeySetIndex, write ? (uint8_t *) &entry->GroupKeySetIndex : src, - write, &entryOffset, sizeof(entry->GroupKeySetIndex)); // INT16U - break; - } - case 0x0001: // group keys - { - entryLength = 31; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _GroupKey - _GroupKey * entry = reinterpret_cast<_GroupKey *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->VendorId, write ? (uint8_t *) &entry->VendorId : src, write, - &entryOffset, sizeof(entry->VendorId)); // INT16U - copyListMember(write ? dest : (uint8_t *) &entry->GroupKeyIndex, write ? (uint8_t *) &entry->GroupKeyIndex : src, write, - &entryOffset, sizeof(entry->GroupKeyIndex)); // INT16U - ByteSpan * GroupKeyRootSpan = &entry->GroupKeyRoot; // OCTET_STRING - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 18, GroupKeyRootSpan) - : ReadByteSpan(src + entryOffset, 18, GroupKeyRootSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 18); - copyListMember(write ? dest : (uint8_t *) &entry->GroupKeyEpochStartTime, - write ? (uint8_t *) &entry->GroupKeyEpochStartTime : src, write, &entryOffset, - sizeof(entry->GroupKeyEpochStartTime)); // INT64U - copyListMember(write ? dest : (uint8_t *) &entry->GroupKeySecurityPolicy, - write ? (uint8_t *) &entry->GroupKeySecurityPolicy : src, write, &entryOffset, - sizeof(entry->GroupKeySecurityPolicy)); // GroupKeySecurityPolicy - break; - } - } - break; - } - case 0x0507: // Media Input Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // media input list - { - entryLength = 70; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _MediaInputInfo - _MediaInputInfo * entry = reinterpret_cast<_MediaInputInfo *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->index, write ? (uint8_t *) &entry->index : src, write, &entryOffset, - sizeof(entry->index)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->inputType, write ? (uint8_t *) &entry->inputType : src, write, - &entryOffset, sizeof(entry->inputType)); // MediaInputType - ByteSpan nameSpanStorage(Uint8::from_const_char(entry->name.data()), entry->name.size()); // CHAR_STRING - ByteSpan * nameSpan = &nameSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 34, nameSpan) : ReadByteSpan(src + entryOffset, 34, nameSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 34); - ByteSpan descriptionSpanStorage(Uint8::from_const_char(entry->description.data()), - entry->description.size()); // CHAR_STRING - ByteSpan * descriptionSpan = &descriptionSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 34, descriptionSpan) - : ReadByteSpan(src + entryOffset, 34, descriptionSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 34); - break; - } - } - break; - } - case 0x003E: // Operational Credentials Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0001: // fabrics list - { - entryLength = 120; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _FabricDescriptor - _FabricDescriptor * entry = reinterpret_cast<_FabricDescriptor *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->FabricIndex, write ? (uint8_t *) &entry->FabricIndex : src, write, - &entryOffset, sizeof(entry->FabricIndex)); // INT8U - ByteSpan * RootPublicKeySpan = &entry->RootPublicKey; // OCTET_STRING - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 67, RootPublicKeySpan) - : ReadByteSpan(src + entryOffset, 67, RootPublicKeySpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 67); - copyListMember(write ? dest : (uint8_t *) &entry->VendorId, write ? (uint8_t *) &entry->VendorId : src, write, - &entryOffset, sizeof(entry->VendorId)); // INT16U - copyListMember(write ? dest : (uint8_t *) &entry->FabricId, write ? (uint8_t *) &entry->FabricId : src, write, - &entryOffset, sizeof(entry->FabricId)); // FABRIC_ID - copyListMember(write ? dest : (uint8_t *) &entry->NodeId, write ? (uint8_t *) &entry->NodeId : src, write, &entryOffset, - sizeof(entry->NodeId)); // NODE_ID - ByteSpan LabelSpanStorage(Uint8::from_const_char(entry->Label.data()), entry->Label.size()); // CHAR_STRING - ByteSpan * LabelSpan = &LabelSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 34, LabelSpan) : ReadByteSpan(src + entryOffset, 34, LabelSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 34); - break; - } - case 0x0004: // TrustedRootCertificates - { - entryOffset = GetByteSpanOffsetFromIndex(write ? dest : src, am->size, static_cast(index - 1)); - if (entryOffset == 0) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - - ByteSpan * trustedRootCertificatesSpan = reinterpret_cast(write ? src : dest); // OCTET_STRING - uint16_t trustedRootCertificatesRemainingSpace = static_cast(am->size - entryOffset); - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, trustedRootCertificatesRemainingSpace, trustedRootCertificatesSpan) - : ReadByteSpan(src + entryOffset, trustedRootCertificatesRemainingSpace, trustedRootCertificatesSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - - if (!CanCastTo(trustedRootCertificatesSpan->size())) - { - ChipLogError(Zcl, "Span size %zu is too large", trustedRootCertificatesSpan->size()); - return 0; - } - entryLength = static_cast(trustedRootCertificatesSpan->size()); - break; - } - } - break; - } - case 0x0034: // Software Diagnostics Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // ThreadMetrics - { - entryLength = 30; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _ThreadMetrics - _ThreadMetrics * entry = reinterpret_cast<_ThreadMetrics *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->Id, write ? (uint8_t *) &entry->Id : src, write, &entryOffset, - sizeof(entry->Id)); // INT64U - ByteSpan NameSpanStorage(Uint8::from_const_char(entry->Name.data()), entry->Name.size()); // CHAR_STRING - ByteSpan * NameSpan = &NameSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 10, NameSpan) : ReadByteSpan(src + entryOffset, 10, NameSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 10); - copyListMember(write ? dest : (uint8_t *) &entry->StackFreeCurrent, write ? (uint8_t *) &entry->StackFreeCurrent : src, - write, &entryOffset, sizeof(entry->StackFreeCurrent)); // INT32U - copyListMember(write ? dest : (uint8_t *) &entry->StackFreeMinimum, write ? (uint8_t *) &entry->StackFreeMinimum : src, - write, &entryOffset, sizeof(entry->StackFreeMinimum)); // INT32U - copyListMember(write ? dest : (uint8_t *) &entry->StackSize, write ? (uint8_t *) &entry->StackSize : src, write, - &entryOffset, sizeof(entry->StackSize)); // INT32U - break; - } - } - break; - } - case 0x0504: // TV Channel Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // channel list - { - entryLength = 106; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _TvChannelInfo - _TvChannelInfo * entry = reinterpret_cast<_TvChannelInfo *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->majorNumber, write ? (uint8_t *) &entry->majorNumber : src, write, - &entryOffset, sizeof(entry->majorNumber)); // INT16U - copyListMember(write ? dest : (uint8_t *) &entry->minorNumber, write ? (uint8_t *) &entry->minorNumber : src, write, - &entryOffset, sizeof(entry->minorNumber)); // INT16U - ByteSpan nameSpanStorage(Uint8::from_const_char(entry->name.data()), entry->name.size()); // CHAR_STRING - ByteSpan * nameSpan = &nameSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 34, nameSpan) : ReadByteSpan(src + entryOffset, 34, nameSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 34); - ByteSpan callSignSpanStorage(Uint8::from_const_char(entry->callSign.data()), entry->callSign.size()); // CHAR_STRING - ByteSpan * callSignSpan = &callSignSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 34, callSignSpan) : ReadByteSpan(src + entryOffset, 34, callSignSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 34); - ByteSpan affiliateCallSignSpanStorage(Uint8::from_const_char(entry->affiliateCallSign.data()), - entry->affiliateCallSign.size()); // CHAR_STRING - ByteSpan * affiliateCallSignSpan = &affiliateCallSignSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 34, affiliateCallSignSpan) - : ReadByteSpan(src + entryOffset, 34, affiliateCallSignSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 34); - break; - } - } - break; - } - case 0x0505: // Target Navigator Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // target navigator list - { - entryLength = 35; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _NavigateTargetTargetInfo - _NavigateTargetTargetInfo * entry = reinterpret_cast<_NavigateTargetTargetInfo *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->identifier, write ? (uint8_t *) &entry->identifier : src, write, - &entryOffset, sizeof(entry->identifier)); // INT8U - ByteSpan nameSpanStorage(Uint8::from_const_char(entry->name.data()), entry->name.size()); // CHAR_STRING - ByteSpan * nameSpan = &nameSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 34, nameSpan) : ReadByteSpan(src + entryOffset, 34, nameSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 34); - break; - } - } - break; - } - case 0x0035: // Thread Network Diagnostics Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0007: // NeighborTableList - { - entryLength = 31; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _NeighborTable - _NeighborTable * entry = reinterpret_cast<_NeighborTable *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->ExtAddress, write ? (uint8_t *) &entry->ExtAddress : src, write, - &entryOffset, sizeof(entry->ExtAddress)); // INT64U - copyListMember(write ? dest : (uint8_t *) &entry->Age, write ? (uint8_t *) &entry->Age : src, write, &entryOffset, - sizeof(entry->Age)); // INT32U - copyListMember(write ? dest : (uint8_t *) &entry->Rloc16, write ? (uint8_t *) &entry->Rloc16 : src, write, &entryOffset, - sizeof(entry->Rloc16)); // INT16U - copyListMember(write ? dest : (uint8_t *) &entry->LinkFrameCounter, write ? (uint8_t *) &entry->LinkFrameCounter : src, - write, &entryOffset, sizeof(entry->LinkFrameCounter)); // INT32U - copyListMember(write ? dest : (uint8_t *) &entry->MleFrameCounter, write ? (uint8_t *) &entry->MleFrameCounter : src, - write, &entryOffset, sizeof(entry->MleFrameCounter)); // INT32U - copyListMember(write ? dest : (uint8_t *) &entry->LQI, write ? (uint8_t *) &entry->LQI : src, write, &entryOffset, - sizeof(entry->LQI)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->AverageRssi, write ? (uint8_t *) &entry->AverageRssi : src, write, - &entryOffset, sizeof(entry->AverageRssi)); // INT8S - copyListMember(write ? dest : (uint8_t *) &entry->LastRssi, write ? (uint8_t *) &entry->LastRssi : src, write, - &entryOffset, sizeof(entry->LastRssi)); // INT8S - copyListMember(write ? dest : (uint8_t *) &entry->FrameErrorRate, write ? (uint8_t *) &entry->FrameErrorRate : src, - write, &entryOffset, sizeof(entry->FrameErrorRate)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->MessageErrorRate, write ? (uint8_t *) &entry->MessageErrorRate : src, - write, &entryOffset, sizeof(entry->MessageErrorRate)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->RxOnWhenIdle, write ? (uint8_t *) &entry->RxOnWhenIdle : src, write, - &entryOffset, sizeof(entry->RxOnWhenIdle)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->FullThreadDevice, write ? (uint8_t *) &entry->FullThreadDevice : src, - write, &entryOffset, sizeof(entry->FullThreadDevice)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->FullNetworkData, write ? (uint8_t *) &entry->FullNetworkData : src, - write, &entryOffset, sizeof(entry->FullNetworkData)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->IsChild, write ? (uint8_t *) &entry->IsChild : src, write, - &entryOffset, sizeof(entry->IsChild)); // BOOLEAN - break; - } - case 0x0008: // RouteTableList - { - entryLength = 18; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _RouteTable - _RouteTable * entry = reinterpret_cast<_RouteTable *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->ExtAddress, write ? (uint8_t *) &entry->ExtAddress : src, write, - &entryOffset, sizeof(entry->ExtAddress)); // INT64U - copyListMember(write ? dest : (uint8_t *) &entry->Rloc16, write ? (uint8_t *) &entry->Rloc16 : src, write, &entryOffset, - sizeof(entry->Rloc16)); // INT16U - copyListMember(write ? dest : (uint8_t *) &entry->RouterId, write ? (uint8_t *) &entry->RouterId : src, write, - &entryOffset, sizeof(entry->RouterId)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->NextHop, write ? (uint8_t *) &entry->NextHop : src, write, - &entryOffset, sizeof(entry->NextHop)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->PathCost, write ? (uint8_t *) &entry->PathCost : src, write, - &entryOffset, sizeof(entry->PathCost)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->LQIIn, write ? (uint8_t *) &entry->LQIIn : src, write, &entryOffset, - sizeof(entry->LQIIn)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->LQIOut, write ? (uint8_t *) &entry->LQIOut : src, write, &entryOffset, - sizeof(entry->LQIOut)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->Age, write ? (uint8_t *) &entry->Age : src, write, &entryOffset, - sizeof(entry->Age)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->Allocated, write ? (uint8_t *) &entry->Allocated : src, write, - &entryOffset, sizeof(entry->Allocated)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->LinkEstablished, write ? (uint8_t *) &entry->LinkEstablished : src, - write, &entryOffset, sizeof(entry->LinkEstablished)); // BOOLEAN - break; - } - case 0x003B: // SecurityPolicy - { - entryLength = 4; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _SecurityPolicy - _SecurityPolicy * entry = reinterpret_cast<_SecurityPolicy *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->RotationTime, write ? (uint8_t *) &entry->RotationTime : src, write, - &entryOffset, sizeof(entry->RotationTime)); // INT16U - copyListMember(write ? dest : (uint8_t *) &entry->Flags, write ? (uint8_t *) &entry->Flags : src, write, &entryOffset, - sizeof(entry->Flags)); // BITMAP16 - break; - } - case 0x003D: // OperationalDatasetComponents - { - entryLength = 12; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _OperationalDatasetComponents - _OperationalDatasetComponents * entry = reinterpret_cast<_OperationalDatasetComponents *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->ActiveTimestampPresent, - write ? (uint8_t *) &entry->ActiveTimestampPresent : src, write, &entryOffset, - sizeof(entry->ActiveTimestampPresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->PendingTimestampPresent, - write ? (uint8_t *) &entry->PendingTimestampPresent : src, write, &entryOffset, - sizeof(entry->PendingTimestampPresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->MasterKeyPresent, write ? (uint8_t *) &entry->MasterKeyPresent : src, - write, &entryOffset, sizeof(entry->MasterKeyPresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->NetworkNamePresent, - write ? (uint8_t *) &entry->NetworkNamePresent : src, write, &entryOffset, - sizeof(entry->NetworkNamePresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->ExtendedPanIdPresent, - write ? (uint8_t *) &entry->ExtendedPanIdPresent : src, write, &entryOffset, - sizeof(entry->ExtendedPanIdPresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->MeshLocalPrefixPresent, - write ? (uint8_t *) &entry->MeshLocalPrefixPresent : src, write, &entryOffset, - sizeof(entry->MeshLocalPrefixPresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->DelayPresent, write ? (uint8_t *) &entry->DelayPresent : src, write, - &entryOffset, sizeof(entry->DelayPresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->PanIdPresent, write ? (uint8_t *) &entry->PanIdPresent : src, write, - &entryOffset, sizeof(entry->PanIdPresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->ChannelPresent, write ? (uint8_t *) &entry->ChannelPresent : src, - write, &entryOffset, sizeof(entry->ChannelPresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->PskcPresent, write ? (uint8_t *) &entry->PskcPresent : src, write, - &entryOffset, sizeof(entry->PskcPresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->SecurityPolicyPresent, - write ? (uint8_t *) &entry->SecurityPolicyPresent : src, write, &entryOffset, - sizeof(entry->SecurityPolicyPresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->ChannelMaskPresent, - write ? (uint8_t *) &entry->ChannelMaskPresent : src, write, &entryOffset, - sizeof(entry->ChannelMaskPresent)); // BOOLEAN - break; - } - case 0x003E: // ActiveNetworkFaultsList - { - entryLength = 1; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - copyListMember(dest, src, write, &entryOffset, entryLength); // NetworkFault - break; - } - } - break; - } - } - - return entryLength; -} - -// A list is a collection of entries of the same data type. The data type may be any defined data type. -uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attributeId, const uint8_t * buffer) -{ - // The first 2 bytes specify the number of entries. A value of 0xFFFF means the list in invalid - // and data is undefined. - uint16_t entryCount = emberAfGetInt16u(buffer, 0, kSizeLengthInBytes); - if (entryCount == 0xFFFF) - { - return 0; - } - - uint16_t entryLength = 0; - switch (clusterId) - { - case 0x050D: // Application Basic Cluster - switch (attributeId) - { - case 0x0007: // allowed vendor list - // uint16_t - entryLength = 2; - break; - } - break; - case 0x050C: // Application Launcher Cluster - switch (attributeId) - { - case 0x0000: // application launcher list - // uint16_t - entryLength = 2; - break; - } - break; - case 0x050B: // Audio Output Cluster - switch (attributeId) - { - case 0x0000: // audio output list - // Struct _AudioOutputInfo - entryLength = 36; - break; - } - break; - case 0x050A: // Content Launcher Cluster - switch (attributeId) - { - case 0x0000: // accept header list - // chip::ByteSpan - return GetByteSpanOffsetFromIndex(buffer, 256, entryCount); - break; - } - break; - case 0x001D: // Descriptor Cluster - switch (attributeId) - { - case 0x0000: // device list - // Struct _DeviceType - entryLength = 6; - break; - case 0x0001: // server list - // chip::ClusterId - entryLength = 4; - break; - case 0x0002: // client list - // chip::ClusterId - entryLength = 4; - break; - case 0x0003: // parts list - // chip::EndpointId - entryLength = 2; - break; - } - break; - case 0x0030: // General Commissioning Cluster - switch (attributeId) - { - case 0x0001: // BasicCommissioningInfoList - // Struct _BasicCommissioningInfoType - entryLength = 4; - break; - } - break; - case 0x0033: // General Diagnostics Cluster - switch (attributeId) - { - case 0x0000: // NetworkInterfaces - // Struct _NetworkInterfaceType - entryLength = 48; - break; - case 0x0005: // ActiveHardwareFaults - // uint8_t - entryLength = 1; - break; - case 0x0006: // ActiveRadioFaults - // uint8_t - entryLength = 1; - break; - case 0x0007: // ActiveNetworkFaults - // uint8_t - entryLength = 1; - break; - } - break; - case 0x003F: // Group Key Management Cluster - switch (attributeId) - { - case 0x0000: // groups - // Struct _GroupState - entryLength = 6; - break; - case 0x0001: // group keys - // Struct _GroupKey - entryLength = 31; - break; - } - break; - case 0x0507: // Media Input Cluster - switch (attributeId) - { - case 0x0000: // media input list - // Struct _MediaInputInfo - entryLength = 70; - break; - } - break; - case 0x003E: // Operational Credentials Cluster - switch (attributeId) - { - case 0x0001: // fabrics list - // Struct _FabricDescriptor - entryLength = 120; - break; - case 0x0004: // TrustedRootCertificates - // chip::ByteSpan - return GetByteSpanOffsetFromIndex(buffer, 402, entryCount); - break; - } - break; - case 0x0034: // Software Diagnostics Cluster - switch (attributeId) - { - case 0x0000: // ThreadMetrics - // Struct _ThreadMetrics - entryLength = 30; - break; - } - break; - case 0x0504: // TV Channel Cluster - switch (attributeId) - { - case 0x0000: // channel list - // Struct _TvChannelInfo - entryLength = 106; - break; - } - break; - case 0x0505: // Target Navigator Cluster - switch (attributeId) - { - case 0x0000: // target navigator list - // Struct _NavigateTargetTargetInfo - entryLength = 35; - break; - } - break; - case 0x0035: // Thread Network Diagnostics Cluster - switch (attributeId) - { - case 0x0007: // NeighborTableList - // Struct _NeighborTable - entryLength = 31; - break; - case 0x0008: // RouteTableList - // Struct _RouteTable - entryLength = 18; - break; - case 0x003B: // SecurityPolicy - // Struct _SecurityPolicy - entryLength = 4; - break; - case 0x003D: // OperationalDatasetComponents - // Struct _OperationalDatasetComponents - entryLength = 12; - break; - case 0x003E: // ActiveNetworkFaultsList - // uint8_t - entryLength = 1; - break; - } - break; - } - - uint32_t totalSize = kSizeLengthInBytes + (entryCount * entryLength); - if (!CanCastTo(totalSize)) - { - ChipLogError(Zcl, "Cluster " ChipLogFormatMEI ": Size of attribute " ChipLogFormatMEI " is too large.", - ChipLogValueMEI(clusterId), ChipLogValueMEI(attributeId)); - return 0; - } - - return static_cast(totalSize); -} diff --git a/zzz_generated/tv-app/zap-generated/callback-stub.cpp b/zzz_generated/tv-app/zap-generated/callback-stub.cpp index 5e13a065a34eab..92d6949c3e3f27 100644 --- a/zzz_generated/tv-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/tv-app/zap-generated/callback-stub.cpp @@ -50,6 +50,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_BINDING_CLUSTER_ID: emberAfBindingClusterInitCallback(endpoint); break; + case ZCL_CHANNEL_CLUSTER_ID: + emberAfChannelClusterInitCallback(endpoint); + break; case ZCL_CONTENT_LAUNCH_CLUSTER_ID: emberAfContentLauncherClusterInitCallback(endpoint); break; @@ -107,9 +110,6 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_SOFTWARE_DIAGNOSTICS_CLUSTER_ID: emberAfSoftwareDiagnosticsClusterInitCallback(endpoint); break; - case ZCL_TV_CHANNEL_CLUSTER_ID: - emberAfTvChannelClusterInitCallback(endpoint); - break; case ZCL_TARGET_NAVIGATOR_CLUSTER_ID: emberAfTargetNavigatorClusterInitCallback(endpoint); break; @@ -166,6 +166,11 @@ void __attribute__((weak)) emberAfBindingClusterInitCallback(EndpointId endpoint // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfChannelClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfContentLauncherClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -261,11 +266,6 @@ void __attribute__((weak)) emberAfSoftwareDiagnosticsClusterInitCallback(Endpoin // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfTvChannelClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfTargetNavigatorClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index 03857299ad060b..b08bbbe376fcfb 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -311,7 +311,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: TV Channel (server), big-endian */ \ + /* Endpoint: 1, Cluster: Channel (server), big-endian */ \ \ /* 1127 - channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -770,7 +770,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: TV Channel (server), little-endian */ \ + /* Endpoint: 1, Cluster: Channel (server), little-endian */ \ \ /* 1127 - channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1217,7 +1217,7 @@ { 0x0000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* wake on lan mac address */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ - /* Endpoint: 1, Cluster: TV Channel (server) */ \ + /* Endpoint: 1, Cluster: Channel (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1127) }, /* channel list */ \ { 0x0001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* channel lineup */ \ @@ -1462,7 +1462,7 @@ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ 0x0504, ZAP_ATTRIBUTE_INDEX(182), 4, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ - }, /* Endpoint: 1, Cluster: TV Channel (server) */ \ + }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ 0x0505, ZAP_ATTRIBUTE_INDEX(186), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ diff --git a/zzz_generated/tv-app/zap-generated/gen_config.h b/zzz_generated/tv-app/zap-generated/gen_config.h index 34ff0706057eec..44886faf0b7ca5 100644 --- a/zzz_generated/tv-app/zap-generated/gen_config.h +++ b/zzz_generated/tv-app/zap-generated/gen_config.h @@ -36,6 +36,7 @@ #define EMBER_AF_AUDIO_OUTPUT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_BINDING_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_CHANNEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_CONTENT_LAUNCH_CLUSTER_SERVER_ENDPOINT_COUNT (3) #define EMBER_AF_DESCRIPTOR_CLUSTER_SERVER_ENDPOINT_COUNT (6) #define EMBER_AF_DIAGNOSTIC_LOGS_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -58,7 +59,6 @@ #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_SOFTWARE_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_TV_CHANNEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TARGET_NAVIGATOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_USER_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -102,6 +102,11 @@ #define EMBER_AF_PLUGIN_BINDING_SERVER #define EMBER_AF_PLUGIN_BINDING +// Use this macro to check if the server side of the Channel cluster is included +#define ZCL_USING_CHANNEL_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_CHANNEL_SERVER +#define EMBER_AF_PLUGIN_CHANNEL + // Use this macro to check if the server side of the Content Launcher cluster is included #define ZCL_USING_CONTENT_LAUNCH_CLUSTER_SERVER #define EMBER_AF_PLUGIN_CONTENT_LAUNCHER_SERVER @@ -213,11 +218,6 @@ #define EMBER_AF_PLUGIN_SOFTWARE_DIAGNOSTICS_SERVER #define EMBER_AF_PLUGIN_SOFTWARE_DIAGNOSTICS -// Use this macro to check if the server side of the TV Channel cluster is included -#define ZCL_USING_TV_CHANNEL_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_TV_CHANNEL_SERVER -#define EMBER_AF_PLUGIN_TV_CHANNEL - // Use this macro to check if the server side of the Target Navigator cluster is included #define ZCL_USING_TARGET_NAVIGATOR_CLUSTER_SERVER #define EMBER_AF_PLUGIN_TARGET_NAVIGATOR_SERVER diff --git a/zzz_generated/tv-casting-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/tv-casting-app/zap-generated/PluginApplicationCallbacks.h index 3510899a75d526..4b52f2797773b5 100644 --- a/zzz_generated/tv-casting-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/tv-casting-app/zap-generated/PluginApplicationCallbacks.h @@ -32,6 +32,7 @@ MatterBinaryInputBasicPluginServerInitCallback(); \ MatterBindingPluginServerInitCallback(); \ MatterBridgedDeviceBasicPluginServerInitCallback(); \ + MatterChannelPluginServerInitCallback(); \ MatterColorControlPluginServerInitCallback(); \ MatterContentLauncherPluginServerInitCallback(); \ MatterDescriptorPluginServerInitCallback(); \ @@ -60,7 +61,6 @@ MatterScenesPluginServerInitCallback(); \ MatterSoftwareDiagnosticsPluginServerInitCallback(); \ MatterSwitchPluginServerInitCallback(); \ - MatterTvChannelPluginServerInitCallback(); \ MatterTargetNavigatorPluginServerInitCallback(); \ MatterTemperatureMeasurementPluginServerInitCallback(); \ MatterTestClusterPluginServerInitCallback(); \ diff --git a/zzz_generated/tv-casting-app/zap-generated/attribute-size.cpp b/zzz_generated/tv-casting-app/zap-generated/attribute-size.cpp deleted file mode 100644 index 9fd437e395e1e4..00000000000000 --- a/zzz_generated/tv-casting-app/zap-generated/attribute-size.cpp +++ /dev/null @@ -1,1158 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -#include -#include -#include -#include -#include -#include -#include - -using namespace chip; -using namespace chip::app::List; - -// The first 2 bytes specify the number of entries. A value of 0xFFFF means the list in invalid -// and data is undefined. -constexpr uint16_t kSizeLengthInBytes = 2u; - -void copyListMember(uint8_t * dest, uint8_t * src, bool write, uint16_t * offset, uint16_t length) -{ - if (write) - { - memmove(dest + *offset, src, length); - } - else - { - memmove(dest, src + *offset, length); - } - - *offset = static_cast(*offset + length); -} - -uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, bool write, uint8_t * dest, uint8_t * src, - int32_t index) -{ - if (index == -1) - { - memmove(dest, src, am->size); - return am->size; - } - - if (index == 0) - { - if (write) - { - // src is a pointer to native-endian uint16_t, dest is pointer to buffer that should hold little-endian value - emberAfCopyInt16u(dest, 0, *reinterpret_cast(src)); - } - else - { - // src is pointer to buffer holding little-endian value, dest is a pointer to native-endian uint16_t - *reinterpret_cast(dest) = emberAfGetInt16u(src, 0, kSizeLengthInBytes); - } - return kSizeLengthInBytes; - } - - if (!CanCastTo(index)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Should be between 1 and 65534", index); - return 0; - } - - uint16_t entryLength = 0; - switch (clusterId) - { - case 0x050D: // Application Basic Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0007: // allowed vendor list - { - entryLength = 2; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - copyListMember(dest, src, write, &entryOffset, entryLength); // INT16U - break; - } - } - break; - } - case 0x050C: // Application Launcher Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // application launcher list - { - entryLength = 2; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - copyListMember(dest, src, write, &entryOffset, entryLength); // INT16U - break; - } - } - break; - } - case 0x050B: // Audio Output Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // audio output list - { - entryLength = 36; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _AudioOutputInfo - _AudioOutputInfo * entry = reinterpret_cast<_AudioOutputInfo *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->index, write ? (uint8_t *) &entry->index : src, write, &entryOffset, - sizeof(entry->index)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->outputType, write ? (uint8_t *) &entry->outputType : src, write, - &entryOffset, sizeof(entry->outputType)); // AudioOutputType - ByteSpan nameSpanStorage(Uint8::from_const_char(entry->name.data()), entry->name.size()); // CHAR_STRING - ByteSpan * nameSpan = &nameSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 34, nameSpan) : ReadByteSpan(src + entryOffset, 34, nameSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 34); - break; - } - } - break; - } - case 0x050A: // Content Launcher Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // accept header list - { - entryOffset = GetByteSpanOffsetFromIndex(write ? dest : src, am->size, static_cast(index - 1)); - if (entryOffset == 0) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - - ByteSpan * acceptHeaderListSpan = reinterpret_cast(write ? src : dest); // OCTET_STRING - uint16_t acceptHeaderListRemainingSpace = static_cast(am->size - entryOffset); - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, acceptHeaderListRemainingSpace, acceptHeaderListSpan) - : ReadByteSpan(src + entryOffset, acceptHeaderListRemainingSpace, acceptHeaderListSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - - if (!CanCastTo(acceptHeaderListSpan->size())) - { - ChipLogError(Zcl, "Span size %zu is too large", acceptHeaderListSpan->size()); - return 0; - } - entryLength = static_cast(acceptHeaderListSpan->size()); - break; - } - } - break; - } - case 0x001D: // Descriptor Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // device list - { - entryLength = 6; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _DeviceType - _DeviceType * entry = reinterpret_cast<_DeviceType *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->type, write ? (uint8_t *) &entry->type : src, write, &entryOffset, - sizeof(entry->type)); // DEVTYPE_ID - copyListMember(write ? dest : (uint8_t *) &entry->revision, write ? (uint8_t *) &entry->revision : src, write, - &entryOffset, sizeof(entry->revision)); // INT16U - break; - } - case 0x0001: // server list - { - entryLength = 4; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - copyListMember(dest, src, write, &entryOffset, entryLength); // CLUSTER_ID - break; - } - case 0x0002: // client list - { - entryLength = 4; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - copyListMember(dest, src, write, &entryOffset, entryLength); // CLUSTER_ID - break; - } - case 0x0003: // parts list - { - entryLength = 2; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - copyListMember(dest, src, write, &entryOffset, entryLength); // ENDPOINT_NO - break; - } - } - break; - } - case 0x0040: // Fixed Label Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // label list - { - entryLength = 36; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _LabelStruct - _LabelStruct * entry = reinterpret_cast<_LabelStruct *>(write ? src : dest); - ByteSpan labelSpanStorage(Uint8::from_const_char(entry->label.data()), entry->label.size()); // CHAR_STRING - ByteSpan * labelSpan = &labelSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 18, labelSpan) : ReadByteSpan(src + entryOffset, 18, labelSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 18); - ByteSpan valueSpanStorage(Uint8::from_const_char(entry->value.data()), entry->value.size()); // CHAR_STRING - ByteSpan * valueSpan = &valueSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 18, valueSpan) : ReadByteSpan(src + entryOffset, 18, valueSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 18); - break; - } - } - break; - } - case 0x0030: // General Commissioning Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0001: // BasicCommissioningInfoList - { - entryLength = 4; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _BasicCommissioningInfoType - _BasicCommissioningInfoType * entry = reinterpret_cast<_BasicCommissioningInfoType *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->FailSafeExpiryLengthMs, - write ? (uint8_t *) &entry->FailSafeExpiryLengthMs : src, write, &entryOffset, - sizeof(entry->FailSafeExpiryLengthMs)); // INT32U - break; - } - } - break; - } - case 0x0033: // General Diagnostics Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // NetworkInterfaces - { - entryLength = 48; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _NetworkInterfaceType - _NetworkInterfaceType * entry = reinterpret_cast<_NetworkInterfaceType *>(write ? src : dest); - ByteSpan NameSpanStorage(Uint8::from_const_char(entry->Name.data()), entry->Name.size()); // CHAR_STRING - ByteSpan * NameSpan = &NameSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 34, NameSpan) : ReadByteSpan(src + entryOffset, 34, NameSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 34); - copyListMember(write ? dest : (uint8_t *) &entry->FabricConnected, write ? (uint8_t *) &entry->FabricConnected : src, - write, &entryOffset, sizeof(entry->FabricConnected)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->OffPremiseServicesReachableIPv4, - write ? (uint8_t *) &entry->OffPremiseServicesReachableIPv4 : src, write, &entryOffset, - sizeof(entry->OffPremiseServicesReachableIPv4)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->OffPremiseServicesReachableIPv6, - write ? (uint8_t *) &entry->OffPremiseServicesReachableIPv6 : src, write, &entryOffset, - sizeof(entry->OffPremiseServicesReachableIPv6)); // BOOLEAN - ByteSpan * HardwareAddressSpan = &entry->HardwareAddress; // OCTET_STRING - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 10, HardwareAddressSpan) - : ReadByteSpan(src + entryOffset, 10, HardwareAddressSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 10); - copyListMember(write ? dest : (uint8_t *) &entry->Type, write ? (uint8_t *) &entry->Type : src, write, &entryOffset, - sizeof(entry->Type)); // InterfaceType - break; - } - case 0x0005: // ActiveHardwareFaults - { - entryLength = 1; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - copyListMember(dest, src, write, &entryOffset, entryLength); // ENUM8 - break; - } - case 0x0006: // ActiveRadioFaults - { - entryLength = 1; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - copyListMember(dest, src, write, &entryOffset, entryLength); // ENUM8 - break; - } - case 0x0007: // ActiveNetworkFaults - { - entryLength = 1; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - copyListMember(dest, src, write, &entryOffset, entryLength); // ENUM8 - break; - } - } - break; - } - case 0x003F: // Group Key Management Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // groups - { - entryLength = 6; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _GroupState - _GroupState * entry = reinterpret_cast<_GroupState *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->VendorId, write ? (uint8_t *) &entry->VendorId : src, write, - &entryOffset, sizeof(entry->VendorId)); // INT16U - copyListMember(write ? dest : (uint8_t *) &entry->VendorGroupId, write ? (uint8_t *) &entry->VendorGroupId : src, write, - &entryOffset, sizeof(entry->VendorGroupId)); // INT16U - copyListMember(write ? dest : (uint8_t *) &entry->GroupKeySetIndex, write ? (uint8_t *) &entry->GroupKeySetIndex : src, - write, &entryOffset, sizeof(entry->GroupKeySetIndex)); // INT16U - break; - } - case 0x0001: // group keys - { - entryLength = 31; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _GroupKey - _GroupKey * entry = reinterpret_cast<_GroupKey *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->VendorId, write ? (uint8_t *) &entry->VendorId : src, write, - &entryOffset, sizeof(entry->VendorId)); // INT16U - copyListMember(write ? dest : (uint8_t *) &entry->GroupKeyIndex, write ? (uint8_t *) &entry->GroupKeyIndex : src, write, - &entryOffset, sizeof(entry->GroupKeyIndex)); // INT16U - ByteSpan * GroupKeyRootSpan = &entry->GroupKeyRoot; // OCTET_STRING - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 18, GroupKeyRootSpan) - : ReadByteSpan(src + entryOffset, 18, GroupKeyRootSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 18); - copyListMember(write ? dest : (uint8_t *) &entry->GroupKeyEpochStartTime, - write ? (uint8_t *) &entry->GroupKeyEpochStartTime : src, write, &entryOffset, - sizeof(entry->GroupKeyEpochStartTime)); // INT64U - copyListMember(write ? dest : (uint8_t *) &entry->GroupKeySecurityPolicy, - write ? (uint8_t *) &entry->GroupKeySecurityPolicy : src, write, &entryOffset, - sizeof(entry->GroupKeySecurityPolicy)); // GroupKeySecurityPolicy - break; - } - } - break; - } - case 0x0507: // Media Input Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // media input list - { - entryLength = 70; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _MediaInputInfo - _MediaInputInfo * entry = reinterpret_cast<_MediaInputInfo *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->index, write ? (uint8_t *) &entry->index : src, write, &entryOffset, - sizeof(entry->index)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->inputType, write ? (uint8_t *) &entry->inputType : src, write, - &entryOffset, sizeof(entry->inputType)); // MediaInputType - ByteSpan nameSpanStorage(Uint8::from_const_char(entry->name.data()), entry->name.size()); // CHAR_STRING - ByteSpan * nameSpan = &nameSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 34, nameSpan) : ReadByteSpan(src + entryOffset, 34, nameSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 34); - ByteSpan descriptionSpanStorage(Uint8::from_const_char(entry->description.data()), - entry->description.size()); // CHAR_STRING - ByteSpan * descriptionSpan = &descriptionSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 34, descriptionSpan) - : ReadByteSpan(src + entryOffset, 34, descriptionSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 34); - break; - } - } - break; - } - case 0x003E: // Operational Credentials Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0001: // fabrics list - { - entryLength = 120; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _FabricDescriptor - _FabricDescriptor * entry = reinterpret_cast<_FabricDescriptor *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->FabricIndex, write ? (uint8_t *) &entry->FabricIndex : src, write, - &entryOffset, sizeof(entry->FabricIndex)); // INT8U - ByteSpan * RootPublicKeySpan = &entry->RootPublicKey; // OCTET_STRING - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 67, RootPublicKeySpan) - : ReadByteSpan(src + entryOffset, 67, RootPublicKeySpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 67); - copyListMember(write ? dest : (uint8_t *) &entry->VendorId, write ? (uint8_t *) &entry->VendorId : src, write, - &entryOffset, sizeof(entry->VendorId)); // INT16U - copyListMember(write ? dest : (uint8_t *) &entry->FabricId, write ? (uint8_t *) &entry->FabricId : src, write, - &entryOffset, sizeof(entry->FabricId)); // FABRIC_ID - copyListMember(write ? dest : (uint8_t *) &entry->NodeId, write ? (uint8_t *) &entry->NodeId : src, write, &entryOffset, - sizeof(entry->NodeId)); // NODE_ID - ByteSpan LabelSpanStorage(Uint8::from_const_char(entry->Label.data()), entry->Label.size()); // CHAR_STRING - ByteSpan * LabelSpan = &LabelSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 34, LabelSpan) : ReadByteSpan(src + entryOffset, 34, LabelSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 34); - break; - } - case 0x0004: // TrustedRootCertificates - { - entryOffset = GetByteSpanOffsetFromIndex(write ? dest : src, am->size, static_cast(index - 1)); - if (entryOffset == 0) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - - ByteSpan * trustedRootCertificatesSpan = reinterpret_cast(write ? src : dest); // OCTET_STRING - uint16_t trustedRootCertificatesRemainingSpace = static_cast(am->size - entryOffset); - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, trustedRootCertificatesRemainingSpace, trustedRootCertificatesSpan) - : ReadByteSpan(src + entryOffset, trustedRootCertificatesRemainingSpace, trustedRootCertificatesSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - - if (!CanCastTo(trustedRootCertificatesSpan->size())) - { - ChipLogError(Zcl, "Span size %zu is too large", trustedRootCertificatesSpan->size()); - return 0; - } - entryLength = static_cast(trustedRootCertificatesSpan->size()); - break; - } - } - break; - } - case 0x0034: // Software Diagnostics Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // ThreadMetrics - { - entryLength = 30; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _ThreadMetrics - _ThreadMetrics * entry = reinterpret_cast<_ThreadMetrics *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->Id, write ? (uint8_t *) &entry->Id : src, write, &entryOffset, - sizeof(entry->Id)); // INT64U - ByteSpan NameSpanStorage(Uint8::from_const_char(entry->Name.data()), entry->Name.size()); // CHAR_STRING - ByteSpan * NameSpan = &NameSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 10, NameSpan) : ReadByteSpan(src + entryOffset, 10, NameSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 10); - copyListMember(write ? dest : (uint8_t *) &entry->StackFreeCurrent, write ? (uint8_t *) &entry->StackFreeCurrent : src, - write, &entryOffset, sizeof(entry->StackFreeCurrent)); // INT32U - copyListMember(write ? dest : (uint8_t *) &entry->StackFreeMinimum, write ? (uint8_t *) &entry->StackFreeMinimum : src, - write, &entryOffset, sizeof(entry->StackFreeMinimum)); // INT32U - copyListMember(write ? dest : (uint8_t *) &entry->StackSize, write ? (uint8_t *) &entry->StackSize : src, write, - &entryOffset, sizeof(entry->StackSize)); // INT32U - break; - } - } - break; - } - case 0x0504: // TV Channel Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // channel list - { - entryLength = 106; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _TvChannelInfo - _TvChannelInfo * entry = reinterpret_cast<_TvChannelInfo *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->majorNumber, write ? (uint8_t *) &entry->majorNumber : src, write, - &entryOffset, sizeof(entry->majorNumber)); // INT16U - copyListMember(write ? dest : (uint8_t *) &entry->minorNumber, write ? (uint8_t *) &entry->minorNumber : src, write, - &entryOffset, sizeof(entry->minorNumber)); // INT16U - ByteSpan nameSpanStorage(Uint8::from_const_char(entry->name.data()), entry->name.size()); // CHAR_STRING - ByteSpan * nameSpan = &nameSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 34, nameSpan) : ReadByteSpan(src + entryOffset, 34, nameSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 34); - ByteSpan callSignSpanStorage(Uint8::from_const_char(entry->callSign.data()), entry->callSign.size()); // CHAR_STRING - ByteSpan * callSignSpan = &callSignSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 34, callSignSpan) : ReadByteSpan(src + entryOffset, 34, callSignSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 34); - ByteSpan affiliateCallSignSpanStorage(Uint8::from_const_char(entry->affiliateCallSign.data()), - entry->affiliateCallSign.size()); // CHAR_STRING - ByteSpan * affiliateCallSignSpan = &affiliateCallSignSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 34, affiliateCallSignSpan) - : ReadByteSpan(src + entryOffset, 34, affiliateCallSignSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 34); - break; - } - } - break; - } - case 0x0505: // Target Navigator Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // target navigator list - { - entryLength = 35; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _NavigateTargetTargetInfo - _NavigateTargetTargetInfo * entry = reinterpret_cast<_NavigateTargetTargetInfo *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->identifier, write ? (uint8_t *) &entry->identifier : src, write, - &entryOffset, sizeof(entry->identifier)); // INT8U - ByteSpan nameSpanStorage(Uint8::from_const_char(entry->name.data()), entry->name.size()); // CHAR_STRING - ByteSpan * nameSpan = &nameSpanStorage; - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 34, nameSpan) : ReadByteSpan(src + entryOffset, 34, nameSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 34); - break; - } - } - break; - } - case 0x050F: // Test Cluster Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x001A: // list_int8u - { - entryLength = 1; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - copyListMember(dest, src, write, &entryOffset, entryLength); // INT8U - break; - } - case 0x001B: // list_octet_string - { - entryOffset = GetByteSpanOffsetFromIndex(write ? dest : src, am->size, static_cast(index - 1)); - if (entryOffset == 0) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - - ByteSpan * listOctetStringSpan = reinterpret_cast(write ? src : dest); // OCTET_STRING - uint16_t listOctetStringRemainingSpace = static_cast(am->size - entryOffset); - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, listOctetStringRemainingSpace, listOctetStringSpan) - : ReadByteSpan(src + entryOffset, listOctetStringRemainingSpace, listOctetStringSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - - if (!CanCastTo(listOctetStringSpan->size())) - { - ChipLogError(Zcl, "Span size %zu is too large", listOctetStringSpan->size()); - return 0; - } - entryLength = static_cast(listOctetStringSpan->size()); - break; - } - case 0x001C: // list_struct_octet_string - { - entryLength = 42; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _TestListStructOctet - _TestListStructOctet * entry = reinterpret_cast<_TestListStructOctet *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->fabricIndex, write ? (uint8_t *) &entry->fabricIndex : src, write, - &entryOffset, sizeof(entry->fabricIndex)); // INT64U - ByteSpan * operationalCertSpan = &entry->operationalCert; // OCTET_STRING - if (CHIP_NO_ERROR != - (write ? WriteByteSpan(dest + entryOffset, 34, operationalCertSpan) - : ReadByteSpan(src + entryOffset, 34, operationalCertSpan))) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); - return 0; - } - entryOffset = static_cast(entryOffset + 34); - break; - } - } - break; - } - case 0x0035: // Thread Network Diagnostics Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0007: // NeighborTableList - { - entryLength = 31; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _NeighborTable - _NeighborTable * entry = reinterpret_cast<_NeighborTable *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->ExtAddress, write ? (uint8_t *) &entry->ExtAddress : src, write, - &entryOffset, sizeof(entry->ExtAddress)); // INT64U - copyListMember(write ? dest : (uint8_t *) &entry->Age, write ? (uint8_t *) &entry->Age : src, write, &entryOffset, - sizeof(entry->Age)); // INT32U - copyListMember(write ? dest : (uint8_t *) &entry->Rloc16, write ? (uint8_t *) &entry->Rloc16 : src, write, &entryOffset, - sizeof(entry->Rloc16)); // INT16U - copyListMember(write ? dest : (uint8_t *) &entry->LinkFrameCounter, write ? (uint8_t *) &entry->LinkFrameCounter : src, - write, &entryOffset, sizeof(entry->LinkFrameCounter)); // INT32U - copyListMember(write ? dest : (uint8_t *) &entry->MleFrameCounter, write ? (uint8_t *) &entry->MleFrameCounter : src, - write, &entryOffset, sizeof(entry->MleFrameCounter)); // INT32U - copyListMember(write ? dest : (uint8_t *) &entry->LQI, write ? (uint8_t *) &entry->LQI : src, write, &entryOffset, - sizeof(entry->LQI)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->AverageRssi, write ? (uint8_t *) &entry->AverageRssi : src, write, - &entryOffset, sizeof(entry->AverageRssi)); // INT8S - copyListMember(write ? dest : (uint8_t *) &entry->LastRssi, write ? (uint8_t *) &entry->LastRssi : src, write, - &entryOffset, sizeof(entry->LastRssi)); // INT8S - copyListMember(write ? dest : (uint8_t *) &entry->FrameErrorRate, write ? (uint8_t *) &entry->FrameErrorRate : src, - write, &entryOffset, sizeof(entry->FrameErrorRate)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->MessageErrorRate, write ? (uint8_t *) &entry->MessageErrorRate : src, - write, &entryOffset, sizeof(entry->MessageErrorRate)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->RxOnWhenIdle, write ? (uint8_t *) &entry->RxOnWhenIdle : src, write, - &entryOffset, sizeof(entry->RxOnWhenIdle)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->FullThreadDevice, write ? (uint8_t *) &entry->FullThreadDevice : src, - write, &entryOffset, sizeof(entry->FullThreadDevice)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->FullNetworkData, write ? (uint8_t *) &entry->FullNetworkData : src, - write, &entryOffset, sizeof(entry->FullNetworkData)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->IsChild, write ? (uint8_t *) &entry->IsChild : src, write, - &entryOffset, sizeof(entry->IsChild)); // BOOLEAN - break; - } - case 0x0008: // RouteTableList - { - entryLength = 18; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _RouteTable - _RouteTable * entry = reinterpret_cast<_RouteTable *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->ExtAddress, write ? (uint8_t *) &entry->ExtAddress : src, write, - &entryOffset, sizeof(entry->ExtAddress)); // INT64U - copyListMember(write ? dest : (uint8_t *) &entry->Rloc16, write ? (uint8_t *) &entry->Rloc16 : src, write, &entryOffset, - sizeof(entry->Rloc16)); // INT16U - copyListMember(write ? dest : (uint8_t *) &entry->RouterId, write ? (uint8_t *) &entry->RouterId : src, write, - &entryOffset, sizeof(entry->RouterId)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->NextHop, write ? (uint8_t *) &entry->NextHop : src, write, - &entryOffset, sizeof(entry->NextHop)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->PathCost, write ? (uint8_t *) &entry->PathCost : src, write, - &entryOffset, sizeof(entry->PathCost)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->LQIIn, write ? (uint8_t *) &entry->LQIIn : src, write, &entryOffset, - sizeof(entry->LQIIn)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->LQIOut, write ? (uint8_t *) &entry->LQIOut : src, write, &entryOffset, - sizeof(entry->LQIOut)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->Age, write ? (uint8_t *) &entry->Age : src, write, &entryOffset, - sizeof(entry->Age)); // INT8U - copyListMember(write ? dest : (uint8_t *) &entry->Allocated, write ? (uint8_t *) &entry->Allocated : src, write, - &entryOffset, sizeof(entry->Allocated)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->LinkEstablished, write ? (uint8_t *) &entry->LinkEstablished : src, - write, &entryOffset, sizeof(entry->LinkEstablished)); // BOOLEAN - break; - } - case 0x003B: // SecurityPolicy - { - entryLength = 4; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _SecurityPolicy - _SecurityPolicy * entry = reinterpret_cast<_SecurityPolicy *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->RotationTime, write ? (uint8_t *) &entry->RotationTime : src, write, - &entryOffset, sizeof(entry->RotationTime)); // INT16U - copyListMember(write ? dest : (uint8_t *) &entry->Flags, write ? (uint8_t *) &entry->Flags : src, write, &entryOffset, - sizeof(entry->Flags)); // BITMAP16 - break; - } - case 0x003D: // OperationalDatasetComponents - { - entryLength = 12; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _OperationalDatasetComponents - _OperationalDatasetComponents * entry = reinterpret_cast<_OperationalDatasetComponents *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->ActiveTimestampPresent, - write ? (uint8_t *) &entry->ActiveTimestampPresent : src, write, &entryOffset, - sizeof(entry->ActiveTimestampPresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->PendingTimestampPresent, - write ? (uint8_t *) &entry->PendingTimestampPresent : src, write, &entryOffset, - sizeof(entry->PendingTimestampPresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->MasterKeyPresent, write ? (uint8_t *) &entry->MasterKeyPresent : src, - write, &entryOffset, sizeof(entry->MasterKeyPresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->NetworkNamePresent, - write ? (uint8_t *) &entry->NetworkNamePresent : src, write, &entryOffset, - sizeof(entry->NetworkNamePresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->ExtendedPanIdPresent, - write ? (uint8_t *) &entry->ExtendedPanIdPresent : src, write, &entryOffset, - sizeof(entry->ExtendedPanIdPresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->MeshLocalPrefixPresent, - write ? (uint8_t *) &entry->MeshLocalPrefixPresent : src, write, &entryOffset, - sizeof(entry->MeshLocalPrefixPresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->DelayPresent, write ? (uint8_t *) &entry->DelayPresent : src, write, - &entryOffset, sizeof(entry->DelayPresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->PanIdPresent, write ? (uint8_t *) &entry->PanIdPresent : src, write, - &entryOffset, sizeof(entry->PanIdPresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->ChannelPresent, write ? (uint8_t *) &entry->ChannelPresent : src, - write, &entryOffset, sizeof(entry->ChannelPresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->PskcPresent, write ? (uint8_t *) &entry->PskcPresent : src, write, - &entryOffset, sizeof(entry->PskcPresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->SecurityPolicyPresent, - write ? (uint8_t *) &entry->SecurityPolicyPresent : src, write, &entryOffset, - sizeof(entry->SecurityPolicyPresent)); // BOOLEAN - copyListMember(write ? dest : (uint8_t *) &entry->ChannelMaskPresent, - write ? (uint8_t *) &entry->ChannelMaskPresent : src, write, &entryOffset, - sizeof(entry->ChannelMaskPresent)); // BOOLEAN - break; - } - case 0x003E: // ActiveNetworkFaultsList - { - entryLength = 1; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - copyListMember(dest, src, write, &entryOffset, entryLength); // NetworkFault - break; - } - } - break; - } - } - - return entryLength; -} - -// A list is a collection of entries of the same data type. The data type may be any defined data type. -uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attributeId, const uint8_t * buffer) -{ - // The first 2 bytes specify the number of entries. A value of 0xFFFF means the list in invalid - // and data is undefined. - uint16_t entryCount = emberAfGetInt16u(buffer, 0, kSizeLengthInBytes); - if (entryCount == 0xFFFF) - { - return 0; - } - - uint16_t entryLength = 0; - switch (clusterId) - { - case 0x050D: // Application Basic Cluster - switch (attributeId) - { - case 0x0007: // allowed vendor list - // uint16_t - entryLength = 2; - break; - } - break; - case 0x050C: // Application Launcher Cluster - switch (attributeId) - { - case 0x0000: // application launcher list - // uint16_t - entryLength = 2; - break; - } - break; - case 0x050B: // Audio Output Cluster - switch (attributeId) - { - case 0x0000: // audio output list - // Struct _AudioOutputInfo - entryLength = 36; - break; - } - break; - case 0x050A: // Content Launcher Cluster - switch (attributeId) - { - case 0x0000: // accept header list - // chip::ByteSpan - return GetByteSpanOffsetFromIndex(buffer, 256, entryCount); - break; - } - break; - case 0x001D: // Descriptor Cluster - switch (attributeId) - { - case 0x0000: // device list - // Struct _DeviceType - entryLength = 6; - break; - case 0x0001: // server list - // chip::ClusterId - entryLength = 4; - break; - case 0x0002: // client list - // chip::ClusterId - entryLength = 4; - break; - case 0x0003: // parts list - // chip::EndpointId - entryLength = 2; - break; - } - break; - case 0x0040: // Fixed Label Cluster - switch (attributeId) - { - case 0x0000: // label list - // Struct _LabelStruct - entryLength = 36; - break; - } - break; - case 0x0030: // General Commissioning Cluster - switch (attributeId) - { - case 0x0001: // BasicCommissioningInfoList - // Struct _BasicCommissioningInfoType - entryLength = 4; - break; - } - break; - case 0x0033: // General Diagnostics Cluster - switch (attributeId) - { - case 0x0000: // NetworkInterfaces - // Struct _NetworkInterfaceType - entryLength = 48; - break; - case 0x0005: // ActiveHardwareFaults - // uint8_t - entryLength = 1; - break; - case 0x0006: // ActiveRadioFaults - // uint8_t - entryLength = 1; - break; - case 0x0007: // ActiveNetworkFaults - // uint8_t - entryLength = 1; - break; - } - break; - case 0x003F: // Group Key Management Cluster - switch (attributeId) - { - case 0x0000: // groups - // Struct _GroupState - entryLength = 6; - break; - case 0x0001: // group keys - // Struct _GroupKey - entryLength = 31; - break; - } - break; - case 0x0507: // Media Input Cluster - switch (attributeId) - { - case 0x0000: // media input list - // Struct _MediaInputInfo - entryLength = 70; - break; - } - break; - case 0x003E: // Operational Credentials Cluster - switch (attributeId) - { - case 0x0001: // fabrics list - // Struct _FabricDescriptor - entryLength = 120; - break; - case 0x0004: // TrustedRootCertificates - // chip::ByteSpan - return GetByteSpanOffsetFromIndex(buffer, 402, entryCount); - break; - } - break; - case 0x0034: // Software Diagnostics Cluster - switch (attributeId) - { - case 0x0000: // ThreadMetrics - // Struct _ThreadMetrics - entryLength = 30; - break; - } - break; - case 0x0504: // TV Channel Cluster - switch (attributeId) - { - case 0x0000: // channel list - // Struct _TvChannelInfo - entryLength = 106; - break; - } - break; - case 0x0505: // Target Navigator Cluster - switch (attributeId) - { - case 0x0000: // target navigator list - // Struct _NavigateTargetTargetInfo - entryLength = 35; - break; - } - break; - case 0x050F: // Test Cluster Cluster - switch (attributeId) - { - case 0x001A: // list_int8u - // uint8_t - entryLength = 1; - break; - case 0x001B: // list_octet_string - // chip::ByteSpan - return GetByteSpanOffsetFromIndex(buffer, 256, entryCount); - break; - case 0x001C: // list_struct_octet_string - // Struct _TestListStructOctet - entryLength = 42; - break; - } - break; - case 0x0035: // Thread Network Diagnostics Cluster - switch (attributeId) - { - case 0x0007: // NeighborTableList - // Struct _NeighborTable - entryLength = 31; - break; - case 0x0008: // RouteTableList - // Struct _RouteTable - entryLength = 18; - break; - case 0x003B: // SecurityPolicy - // Struct _SecurityPolicy - entryLength = 4; - break; - case 0x003D: // OperationalDatasetComponents - // Struct _OperationalDatasetComponents - entryLength = 12; - break; - case 0x003E: // ActiveNetworkFaultsList - // uint8_t - entryLength = 1; - break; - } - break; - } - - uint32_t totalSize = kSizeLengthInBytes + (entryCount * entryLength); - if (!CanCastTo(totalSize)) - { - ChipLogError(Zcl, "Cluster " ChipLogFormatMEI ": Size of attribute " ChipLogFormatMEI " is too large.", - ChipLogValueMEI(clusterId), ChipLogValueMEI(attributeId)); - return 0; - } - - return static_cast(totalSize); -} diff --git a/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp b/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp index 4c601605d27b22..8b5794eb07ee0b 100644 --- a/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp @@ -59,6 +59,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID: emberAfBridgedDeviceBasicClusterInitCallback(endpoint); break; + case ZCL_CHANNEL_CLUSTER_ID: + emberAfChannelClusterInitCallback(endpoint); + break; case ZCL_COLOR_CONTROL_CLUSTER_ID: emberAfColorControlClusterInitCallback(endpoint); break; @@ -143,9 +146,6 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_SWITCH_CLUSTER_ID: emberAfSwitchClusterInitCallback(endpoint); break; - case ZCL_TV_CHANNEL_CLUSTER_ID: - emberAfTvChannelClusterInitCallback(endpoint); - break; case ZCL_TARGET_NAVIGATOR_CLUSTER_ID: emberAfTargetNavigatorClusterInitCallback(endpoint); break; @@ -229,6 +229,11 @@ void __attribute__((weak)) emberAfBridgedDeviceBasicClusterInitCallback(Endpoint // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfChannelClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfColorControlClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -369,11 +374,6 @@ void __attribute__((weak)) emberAfSwitchClusterInitCallback(EndpointId endpoint) // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfTvChannelClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfTargetNavigatorClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index b6e6d6f4058167..46d3402d08a17c 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -355,7 +355,7 @@ /* 1413 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: TV Channel (server), big-endian */ \ + /* Endpoint: 1, Cluster: Channel (server), big-endian */ \ \ /* 1421 - channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -854,7 +854,7 @@ /* 1413 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: TV Channel (server), little-endian */ \ + /* Endpoint: 1, Cluster: Channel (server), little-endian */ \ \ /* 1421 - channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1567,7 +1567,7 @@ { 0x0000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* wake on lan mac address */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ - /* Endpoint: 1, Cluster: TV Channel (server) */ \ + /* Endpoint: 1, Cluster: Channel (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1421) }, /* channel list */ \ { 0x0001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* channel lineup */ \ @@ -1853,7 +1853,7 @@ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ 0x0504, ZAP_ATTRIBUTE_INDEX(360), 4, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ - }, /* Endpoint: 1, Cluster: TV Channel (server) */ \ + }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ 0x0505, ZAP_ATTRIBUTE_INDEX(364), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ diff --git a/zzz_generated/tv-casting-app/zap-generated/gen_config.h b/zzz_generated/tv-casting-app/zap-generated/gen_config.h index 221c4e047dbff9..150102a30eecd3 100644 --- a/zzz_generated/tv-casting-app/zap-generated/gen_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/gen_config.h @@ -39,6 +39,7 @@ #define EMBER_AF_BINARY_INPUT_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_BINDING_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_BRIDGED_DEVICE_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_CHANNEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_CONTENT_LAUNCH_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_DESCRIPTOR_CLUSTER_SERVER_ENDPOINT_COUNT (3) @@ -67,7 +68,6 @@ #define EMBER_AF_SCENES_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_SOFTWARE_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_SWITCH_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_TV_CHANNEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TARGET_NAVIGATOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TEMP_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TEST_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -130,6 +130,11 @@ #define EMBER_AF_PLUGIN_BRIDGED_DEVICE_BASIC_SERVER #define EMBER_AF_PLUGIN_BRIDGED_DEVICE_BASIC +// Use this macro to check if the server side of the Channel cluster is included +#define ZCL_USING_CHANNEL_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_CHANNEL_SERVER +#define EMBER_AF_PLUGIN_CHANNEL + // Use this macro to check if the server side of the Color Control cluster is included #define ZCL_USING_COLOR_CONTROL_CLUSTER_SERVER #define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER @@ -282,11 +287,6 @@ #define EMBER_AF_PLUGIN_SWITCH_SERVER #define EMBER_AF_PLUGIN_SWITCH -// Use this macro to check if the server side of the TV Channel cluster is included -#define ZCL_USING_TV_CHANNEL_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_TV_CHANNEL_SERVER -#define EMBER_AF_PLUGIN_TV_CHANNEL - // Use this macro to check if the server side of the Target Navigator cluster is included #define ZCL_USING_TARGET_NAVIGATOR_CLUSTER_SERVER #define EMBER_AF_PLUGIN_TARGET_NAVIGATOR_SERVER